diff --git a/base/llvm/install-prefix.patch b/base/llvm/install-prefix.patch new file mode 100644 index 0000000..7b8ce03 --- /dev/null +++ b/base/llvm/install-prefix.patch @@ -0,0 +1,31 @@ +starting from llvm14 the install prefix breaks via symlinks; +/usr/lib/llvm14/lib/cmake/llvm/LLVMConfig.cmake goes up 3 directories to find +/usr/lib/llvm14/include as LLVM_INCLUDE_DIRS, but to even use this cmake folder +at all it has to be symlinked to /usr/lib/cmake/llvm .. so the directory it +instead uses is just /usr/include, which is not where the cmake includes are. +this hardcodes them to the install prefix we pass via cmake, which should +always be correct, and what cmake tries to autodetect anyway. + +also see: https://reviews.llvm.org/D29969 + +this is supposedly fixed now, but for some reason it still isn't +--- a/cmake/modules/CMakeLists.txt ++++ b/cmake/modules/CMakeLists.txt +@@ -41,6 +41,8 @@ + # + + set(LLVM_CONFIG_CODE " ++# this is wrong when automatically detected ++set(LLVM_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\") + # LLVM_BUILD_* values available only from LLVM build tree. + set(LLVM_BUILD_BINARY_DIR \"${LLVM_BINARY_DIR}\") + set(LLVM_BUILD_LIBRARY_DIR \"${LLVM_LIBRARY_DIR}\") +@@ -109,8 +111,6 @@ + # + # Generate LLVMConfig.cmake for the install tree. + # +- +-find_prefix_from_config(LLVM_CONFIG_CODE LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PACKAGE_DIR}") + + extend_path(LLVM_CONFIG_MAIN_INCLUDE_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_INCLUDEDIR}") + # This is the same as the above because the handwritten and generated headers diff --git a/base/llvm/llvm.SMBuild b/base/llvm/llvm.SMBuild index b632aca..ce565e7 100755 --- a/base/llvm/llvm.SMBuild +++ b/base/llvm/llvm.SMBuild @@ -1,26 +1,35 @@ # Maintainer: PktSurf app=llvm -version=15.0.7 -build=2sml +version=17.0.6 +build=1sml homepage="http://llvm.org/" download="https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/llvm-$version.src.tar.xz" desc="LLVM compiler toolkit" -requires="libffi libxml2 perl" +requires="libffi libxml2 perl cmake" +# llvm loves to override any option that alters placement of binaries +ignoreusrbin=1 prepbuilddir() { mkandenterbuilddir rm -rf $app-$version.src + # In case the user decides to resume an incomplete build + [[ -d cmake ]] && rm -r cmake tar xf $srcdir/$app-$version.src.tar.?z* cd $app-$version.src fixbuilddirpermissions - + + applypatch $srcdir/install-prefix.patch + + buildtargets='X86;AMDGPU;BPF' + + # cmake modules directory needs to one level up ( cd .. - tar xf $srcdir/cmake-$version.src.tar.xz - cp -r cmake-$version.src cmake + tar xf $srcdir/cmake-$version.src.tar.?z + mv cmake-$version.src cmake ) - + ( cd tools tar xf $srcdir/clang-$version.src.tar.?z @@ -42,39 +51,29 @@ prepbuilddir() { cp -r ../projects/libunwind/include/mach-o include/ rm -r ../projects/libunwind ) - - applypatch $srcdir/lfs64.patch } build() { - # We don't need our optimisations for small builds unset CFLAGS CXXFLAGS - - # Set build targets - if [[ $arch = x86_64 ]] ; then - buildtarget='X86;AMDGPU;BPF' - elif [[ $arch = aarch64 ]] ; then - buildtarget="AArch64" - fi cd smbuild - cmake .. -G Ninja \ + cmake .. -G Ninja -Wno-dev \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX="" \ + -DCMAKE_INSTALL_PREFIX=/usr \ -DLLVM_BUILD_DOCS=OFF \ -DLLVM_BUILD_EXAMPLES=OFF \ - -DBUILD_SHARED_LIBS=ON \ -DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_BUILD_TESTS=OFF \ + -DLLVM_INCLUDE_TESTS=OFF \ -DLLVM_ENABLE_FFI=ON \ -DLLVM_ENABLE_RTTI=ON \ - -DLLVM_INSTALL_UTILS=ON \ -DLLVM_ENABLE_LIBEDIT=OFF \ - -DLLVM_TARGETS_TO_BUILD="$buildtarget" \ - -DLLVM_BINUTILS_INCDIR="/include" \ + -DLLVM_INSTALL_UTILS=ON \ + -DLLVM_TARGETS_TO_BUILD="$buildtargets" \ -DLLVM_INCLUDE_BENCHMARKS=OFF \ -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_INSTALL_PREFIX="/bin" \ + -DLLVM_BUILD_LLVM_DYLIB=ON \ + -DLLVM_LINK_LLVM_DYLIB=ON \ -DCLANG_RESOURCE_DIR="../lib/clang/$version" ninja $MAKEFLAGS @@ -86,10 +85,10 @@ build() { } sha512sums=" -9fd2736a9f5993ddbb5b3c507fe497234a6def64f6f418f379d1ca56c9c361ad1ae9a5445ab938230fbc1671ec00b4f802a412b048569023863c20dc6bb46a1f clang-15.0.7.src.tar.xz -85097a6eaee0df004567905f7e5ce8ca02e3b46c6fc66fa552fe99734642e6ee61685de4e5e6e8b505963334d7b91d98ecd9c5870e6bdd3f0018ee5b963ffa96 cmake-15.0.7.src.tar.xz -ebc73a5c68615a4462f4d05040a68a28e92b144d8c66d3fb2271cf6fff60a0adb1b913c8e520717ac2f6bd9e4b44c16d9461ef70502975975d1779e2b27a9392 libunwind-15.0.7.src.tar.xz -5dc0690c1eb3c37ee29c4add65a08f7b93ce1363cf9099243c9dc1124d1ca77fe19bbf24dad3984de4553eda716f706d49dff63461b709bec6645272e67f0178 lld-15.0.7.src.tar.xz -ed8d565515b1bc6164e4ff06d3388ba92e332850305496fd65db9adf1ec87bd9dd1bfde49dd41be5d5216289efc72bfd287cd7392f2bba80b740d4c314c749e5 llvm-15.0.7.src.tar.xz -e288e8d3389536f1f040c0ae8a8eae168de8eedba6040efd5f477701e18529711329a279c6b86d5214ab44efaa6e27818d109be78891ee93e241a0ab1b3a0c5a lfs64.patch +9dee9b2897f8bc9eeb86cd726df706d6451f223bfc612c2c722aca3b70495546688bb28f6d6753e177731cb041d6a78d407a00215317d6cb17e56671c09ead59 clang-17.0.6.src.tar.lz +4ea1adcd10729f73e84d00e5800cb2f40daf7c3c91d6717fc7572d2db95902c927daed0b403c660beae673973431aecf854eeafa966bd2145ee917a8b090f78a cmake-17.0.6.src.tar.lz +93313c449a58f8f81a13231fd1e3168267bd504689fb5c6e9a0d8a99e3dfe0be68968f5614e00836808bd7a730121bc94f459ada8cf6cf010d13178a8446ae7e libunwind-17.0.6.src.tar.lz +8c313ba8f40015c10f6826bad5d7553ec1fc6c634b4a384789611f541bf210fd69fdd77f13a6bb8ee8fb2283d5a2c08dbbccf8603c7a2cec9904eb18c5fcc403 lld-17.0.6.src.tar.lz +0eb60df337875c110dfac112f6bb4e7686919f09c8e007b77a9f6e0f723c31721f09902e7b8bed07acea00aa5c02e07e3aee756fdf0caf74f01c4f9488107bbf llvm-17.0.6.src.tar.lz +c2ca2124370ec43b9a2fa769aa5580f908453041450479d60458f03aa54e89604bd4225b5991cac0cb8c424cdb2e4e121b78e4175e591955f2fba2c3b0fd0851 install-prefix.patch " diff --git a/base/mandoc/configure.local b/base/mandoc/configure.local index 15b367b..858b8cb 100644 --- a/base/mandoc/configure.local +++ b/base/mandoc/configure.local @@ -1,8 +1,10 @@ PREFIX="" -MANDIR="${PREFIX}/share/man" -SBINDIR="${PREFIX}/bin" -MANPATH_DEFAULT="${PREFIX}/share:${PREFIX}/share/man" -MANPATH_BASE="${PREFIX}/share" +INCLUDEDIR="/usr/include" +LIBDIR="/usr/lib" +SBINDIR="/bin" +MANDIR="/usr/share/man" +MANPATH_DEFAULT="/usr/share:/usr/share/man" +MANPATH_BASE="/usr/share" UTF8_LOCALE=en_US.UTF-8 OSNAME="SMLinux" INSTALL_PROGRAM="install -m 0755" diff --git a/base/mandoc/mandoc.SMBuild b/base/mandoc/mandoc.SMBuild index e6c815a..f5e0b5c 100755 --- a/base/mandoc/mandoc.SMBuild +++ b/base/mandoc/mandoc.SMBuild @@ -25,20 +25,12 @@ prepbuilddir() { build() { cp $srcdir/configure.local configure.local - ./configure + ./configure --p make - make DESTDIR=$pkg PREFIX= LIBDIR=/lib base-install lib-install + make DESTDIR=$pkg base-install lib-install cp LICENSE $pkgdocs/ - ( - cd $pkg/bin - for i in apropos makewhatis man whatis ; do - rm "$pkg"/bin/"$i" - ln -sf mandoc "$pkg"/bin/"$i" - done - ) - mkfinalpkg } diff --git a/base/nodejs/nodejs.SMBuild b/base/nodejs/nodejs.SMBuild index 6657003..4fadfe8 100755 --- a/base/nodejs/nodejs.SMBuild +++ b/base/nodejs/nodejs.SMBuild @@ -4,20 +4,21 @@ version=18.14.2 build=1sml homepage="https://nodejs.org/en/" desc="Asynchronous event-driven Javascript engine designed to build scalable network applications" -requires="openssl" +requires="openssl gyp" +ignoreusrbin=1 prepbuilddir() { mkandenterbuilddir - rm -rf node-v"$version" + rm -rf $app-$version - tar xf $srcdir/node-v"$version".tar.?z* - cd node-v"$version" + tar xf $srcdir/$app-$version.tar.?z* + cd $app-$version fixbuilddirpermissions } build() { ./configure \ - --prefix=/ \ + --prefix=/usr \ --shared-zlib \ --shared-openssl @@ -30,5 +31,5 @@ build() { } sha512sums=" -44c874e47ffdd5a9068541eaf553ed3de0baa470f0016a601aae9e840d7baf82bcb4f6bc1f74cf06a4882c83f67e8a77f95d4c79993e70873760c0f51aff4593 node-v18.14.2.tar.gz +92ec5fe834e4574b312d2b8baacfe96fdf02becaf32c6dc8d4c667a782f67a53f5a23bc8b34ca9cf8e26fab782c4c39d23a5c17ac8336b4ce0079003267d96d2 nodejs-18.14.2.tar.lz " diff --git a/base/xmlto/xmlto.SMBuild b/base/xmlto/xmlto.SMBuild index 84f3ac1..42513e2 100755 --- a/base/xmlto/xmlto.SMBuild +++ b/base/xmlto/xmlto.SMBuild @@ -1,6 +1,6 @@ # Maintainer: PktSurf app=xmlto -version=0.0.28 +version=0.0.29 build=1sml homepage="https://pagure.io/xmlto" download="https://releases.pagure.org/xmlto/xmlto-$version.tar.bz2" @@ -14,11 +14,15 @@ prepbuilddir() { tar xf $srcdir/$app-$version.tar.?z* cd $app-$version fixbuilddirpermissions + + touch NEWS README AUTHORS + autoreconf -vif } build() { ./configure \ - --prefix= + --prefix=/usr \ + --bindir=/bin make make install DESTDIR=$pkg @@ -29,5 +33,5 @@ build() { } sha512sums=" -428af553df979773a83136b31766a1a66bcf8524797b5e0a5973d2a28b5296b215765167e7aaa3ecfbed031ed17c72bedcd660c4f854e7673921d50bc1da4584 xmlto-0.0.28.tar.lz -" +991d65dc001d9b0144363ecc4ba57def79c440d80a2106b729484afbe3b4b3a027ae0f0073a6cc283d041fa067dc843c554938afabf1d86964ca7cf33a92cb38 xmlto-0.0.29.tar.lz +" \ No newline at end of file