make patchLaDependencyPrefix argument optional, remove cleanLaFiles

This commit is contained in:
DubbleClick
2025-06-10 19:46:55 +07:00
parent 684b5d4534
commit 9ed62b02b6
17 changed files with 26 additions and 42 deletions

View File

@@ -38,7 +38,5 @@ trait freetype
' -L/lib ',
' -L' . BUILD_ROOT_PATH . '/lib '
);
$this->cleanLaFiles();
}
}

View File

@@ -34,6 +34,6 @@ trait gettext
->exec('make clean')
->exec("make -j{$this->builder->concurrency}")
->exec('make install');
$this->patchLaDependencyPrefix(['libintl.la']);
$this->patchLaDependencyPrefix();
}
}

View File

@@ -78,10 +78,6 @@ trait imagemagick
'includearchdir=${prefix}/include/ImageMagick-7'
);
}
$this->patchLaDependencyPrefix([
'libMagick++-7.Q16HDRI.la',
'libMagickCore-7.Q16HDRI.la',
'libMagickWand-7.Q16HDRI.la',
]);
$this->patchLaDependencyPrefix();
}
}

View File

@@ -48,6 +48,6 @@ trait ldap
FileSystem::replaceFileLineContainsString(BUILD_LIB_PATH . '/pkgconfig/ldap.pc', 'Libs: -L${libdir} -lldap', 'Libs: -L${libdir} -lldap -llber');
$this->patchPkgconfPrefix(['ldap.pc', 'lber.pc']);
$this->patchLaDependencyPrefix(['libldap.la', 'liblber.la']);
$this->patchLaDependencyPrefix();
}
}

View File

@@ -23,6 +23,5 @@ trait libavif
->build();
// patch pkgconfig
$this->patchPkgconfPrefix(['libavif.pc']);
$this->cleanLaFiles();
}
}

View File

@@ -21,6 +21,6 @@ trait libiconv
->exec("make -j{$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchLaDependencyPrefix(['libiconv.la']);
$this->patchLaDependencyPrefix();
}
}

View File

@@ -26,6 +26,5 @@ trait libjpeg
->build();
// patch pkgconfig
$this->patchPkgconfPrefix(['libjpeg.pc', 'libturbojpeg.pc']);
$this->cleanLaFiles();
}
}

View File

@@ -24,8 +24,6 @@ trait libwebp
// patch pkgconfig
$this->patchPkgconfPrefix(['libsharpyuv.pc', 'libwebp.pc', 'libwebpdecoder.pc', 'libwebpdemux.pc', 'libwebpmux.pc'], PKGCONF_PATCH_PREFIX | PKGCONF_PATCH_LIBDIR);
$this->patchPkgconfPrefix(['libsharpyuv.pc'], PKGCONF_PATCH_CUSTOM, ['/^includedir=.*$/m', 'includedir=${prefix}/include/webp']);
$this->cleanLaFiles();
// fix imagemagick binary linking issue
$this->patchPkgconfPrefix(['libwebp.pc'], PKGCONF_PATCH_CUSTOM, ['/-lwebp$/m', '-lwebp -lsharpyuv']);
}
}

View File

@@ -47,8 +47,8 @@ trait libxslt
->exec('make clean')
->exec("make -j{$this->builder->concurrency}")
->exec('make install DESTDIR=' . escapeshellarg(BUILD_ROOT_PATH));
$this->patchPkgconfPrefix(['libexslt.pc']);
$this->patchLaDependencyPrefix(['libxslt.la', 'libexslt.la']);
$this->patchPkgconfPrefix(['libxslt.pc', 'libexslt.pc']);
$this->patchLaDependencyPrefix();
shell()->cd(BUILD_LIB_PATH)
->exec("ar -t libxslt.a | grep '\\.a$' | xargs -n1 ar d libxslt.a")
->exec("ar -t libexslt.a | grep '\\.a$' | xargs -n1 ar d libexslt.a");

View File

@@ -54,6 +54,6 @@ trait nghttp2
->exec("make -j{$this->builder->concurrency}")
->exec("make install DESTDIR={$destdir}");
$this->patchPkgconfPrefix(['libnghttp2.pc']);
$this->patchLaDependencyPrefix(['libnghttp2.la']);
$this->patchLaDependencyPrefix();
}
}

View File

@@ -28,6 +28,6 @@ trait nghttp3
->exec("make -j{$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchPkgconfPrefix(['libnghttp3.pc']);
$this->patchLaDependencyPrefix(['libnghttp3.la']);
$this->patchLaDependencyPrefix();
}
}

View File

@@ -44,7 +44,7 @@ trait ngtcp2
->exec("make -j{$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchPkgconfPrefix(['libngtcp2.pc', 'libngtcp2_crypto_ossl.pc']);
$this->patchLaDependencyPrefix(['libngtcp2.la', 'libngtcp2_crypto_ossl.la']);
$this->patchLaDependencyPrefix();
// on macOS, the static library may contain other static libraries?
// ld: archive member 'libssl.a' not a mach-o file in libngtcp2_crypto_ossl.a

View File

@@ -31,6 +31,6 @@ trait unixodbc
->exec("make -j{$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchPkgconfPrefix(['odbc.pc', 'odbccr.pc', 'odbcinst.pc']);
$this->cleanLaFiles();
$this->patchLaDependencyPrefix();
}
}

View File

@@ -30,6 +30,6 @@ trait xz
->exec("make -j{$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchPkgconfPrefix(['liblzma.pc']);
$this->patchLaDependencyPrefix(['liblzma.la']);
$this->patchLaDependencyPrefix();
}
}