From c229096983d325ab5ca2a077abc6ecdb167076cf Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Wed, 15 Jan 2025 02:05:11 +0200 Subject: [PATCH] + fix fpmake.pp and enable compilation of package libsndfile --- packages/fpmake_add.inc | 1 + packages/fpmake_proc.inc | 6 ++++ packages/libsndfile/fpmake.pp | 43 ++++++++++++++++++++++++++ packages/libsndfile/fpmake_disabled.pp | 33 -------------------- 4 files changed, 50 insertions(+), 33 deletions(-) create mode 100644 packages/libsndfile/fpmake.pp delete mode 100644 packages/libsndfile/fpmake_disabled.pp diff --git a/packages/fpmake_add.inc b/packages/fpmake_add.inc index 2d5a1f6aff..d0a136ac0a 100644 --- a/packages/fpmake_add.inc +++ b/packages/fpmake_add.inc @@ -165,3 +165,4 @@ add_ptckvm(ADirectory+IncludeTrailingPathDelimiter('ptckvm')); add_fcl_fpterm(ADirectory+IncludeTrailingPathDelimiter('fcl-fpterm')); add_libjack(ADirectory+IncludeTrailingPathDelimiter('libjack')); + add_libsndfile(ADirectory+IncludeTrailingPathDelimiter('libsndfile')); diff --git a/packages/fpmake_proc.inc b/packages/fpmake_proc.inc index 34fd2e75f0..af5ff6d538 100644 --- a/packages/fpmake_proc.inc +++ b/packages/fpmake_proc.inc @@ -935,3 +935,9 @@ begin with Installer do {$include libjack/fpmake.pp} end; + +procedure add_libsndfile(const ADirectory: string); +begin + with Installer do +{$include libsndfile/fpmake.pp} +end; diff --git a/packages/libsndfile/fpmake.pp b/packages/libsndfile/fpmake.pp new file mode 100644 index 0000000000..1d87760c20 --- /dev/null +++ b/packages/libsndfile/fpmake.pp @@ -0,0 +1,43 @@ +{$ifndef ALLPACKAGES} +{$mode objfpc}{$H+} +program fpmake; + +uses {$ifdef unix}cthreads,{$endif} fpmkunit; + +Var + P : TPackage; + T : TTarget; +begin + With Installer do + begin +{$endif ALLPACKAGES} + + P:=AddPackage('libsndfile'); + P.ShortName:='lsndfile'; +{$ifdef ALLPACKAGES} + P.Directory:=ADirectory; +{$endif ALLPACKAGES} + P.Version:='3.3.1'; + P.Author := 'Library: libsndfile'; + P.License := 'Library: LGPL'; + P.HomepageURL := 'https://libsndfile.github.io/libsndfile/'; + P.Email := ''; + P.Description := 'Headers for the libsndfile library'; + P.NeedLibC:= true; // true for headers that indirectly link to libc? + P.OSes := AllUnixOSes-[qnx]; + P.SourcePath.Add('src'); + + T:=P.Targets.AddUnit('sndfile.pp'); + + P.Sources.AddSrc('README'); + + P.ExamplePath.Add('examples'); + P.Targets.AddExampleProgram('sfplay.pp'); + + P.NamespaceMap:='namespaces.lst'; + +{$ifndef ALLPACKAGES} + Run; + end; +end. +{$endif ALLPACKAGES} diff --git a/packages/libsndfile/fpmake_disabled.pp b/packages/libsndfile/fpmake_disabled.pp deleted file mode 100644 index 7cab30a504..0000000000 --- a/packages/libsndfile/fpmake_disabled.pp +++ /dev/null @@ -1,33 +0,0 @@ -{$ifndef ALLPACKAGES} -{$mode objfpc}{$H+} -program fpmake; - -uses fpmkunit; - -Var - P : TPackage; - T : TTarget; -begin - With Installer do - begin -{$endif ALLPACKAGES} - - P:=AddPackage('sndfile'); -{$ifdef ALLPACKAGES} - P.Directory:='sndfile'; -{$endif ALLPACKAGES} - P.Version:='2.2.2-0'; - P.SourcePath.Add('src'); - - T:=P.Targets.AddUnit('sndfile.pp'); - - P.Sources.AddSrc('README'); - - P.ExamplePath.Add('examples'); - P.Targets.AddExampleProgram('sfplay.pp'); - -{$ifndef ALLPACKAGES} - Run; - end; -end. -{$endif ALLPACKAGES}