ports/contrib (3.7): gklib: initial commit, version 20230327
commit 3291678295516776f97ef820e10418e429c00252 Author: Tim Biermann <tbier@posteo.de> Date: Mon Nov 27 20:53:44 2023 +0100 gklib: initial commit, version 20230327 diff --git a/gklib/.footprint b/gklib/.footprint new file mode 100644 index 000000000..aa3a52834 --- /dev/null +++ b/gklib/.footprint @@ -0,0 +1,26 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/csrcnv +drwxr-xr-x root/root usr/include/ +-rw-r--r-- root/root usr/include/GKlib.h +-rw-r--r-- root/root usr/include/gk_arch.h +-rw-r--r-- root/root usr/include/gk_defs.h +-rw-r--r-- root/root usr/include/gk_externs.h +-rw-r--r-- root/root usr/include/gk_getopt.h +-rw-r--r-- root/root usr/include/gk_macros.h +-rw-r--r-- root/root usr/include/gk_mkblas.h +-rw-r--r-- root/root usr/include/gk_mkmemory.h +-rw-r--r-- root/root usr/include/gk_mkpqueue.h +-rw-r--r-- root/root usr/include/gk_mkpqueue2.h +-rw-r--r-- root/root usr/include/gk_mkrandom.h +-rw-r--r-- root/root usr/include/gk_mksort.h +-rw-r--r-- root/root usr/include/gk_mkutils.h +-rw-r--r-- root/root usr/include/gk_ms_inttypes.h +-rw-r--r-- root/root usr/include/gk_ms_stat.h +-rw-r--r-- root/root usr/include/gk_ms_stdint.h +-rw-r--r-- root/root usr/include/gk_proto.h +-rw-r--r-- root/root usr/include/gk_struct.h +-rw-r--r-- root/root usr/include/gk_types.h +-rw-r--r-- root/root usr/include/gkregex.h +drwxr-xr-x root/root usr/lib/ +-rw-r--r-- root/root usr/lib/libGKlib.a diff --git a/gklib/.signature b/gklib/.signature new file mode 100644 index 000000000..22aa56433 --- /dev/null +++ b/gklib/.signature @@ -0,0 +1,7 @@ +untrusted comment: verify with /etc/ports/contrib.pub +RWSagIOpLGJF34cfv63tIrJqUAID2+BNFqSy4zmH6rI50H/GULii9ejdOz88qsS+meuaprcU/G83ux+HwdhIofIgT+5RVAn+lAQ= +SHA256 (Pkgfile) = 9323d2e3b6d08fd6ee765f3039c3266136e1db8de964dda919b660150074c876 +SHA256 (.footprint) = 8bd081185d2db8355e029e488869120c862c10aaa35459fb9131f23cc7d1b4c2 +SHA256 (gklib-20230327.tar.gz) = e1d59de12336731e6dde8465f05de7b907fae5d72c921cffcde217a89eaab654 +SHA256 (gklib-5.1.1_p20230327-multilib.patch) = c9d06ffd0046f8e2e08a39451885c90e64983dd69845691f351dd363f322cf71 +SHA256 (gklib-5.1.1_p20230327-respect-user-flags.patch) = 50fe4cef86b3404036b4e941d71dbb0a5aa96d7cd9fab563c0774ce648dee54e diff --git a/gklib/Pkgfile b/gklib/Pkgfile new file mode 100644 index 000000000..1ec49818f --- /dev/null +++ b/gklib/Pkgfile @@ -0,0 +1,29 @@ +# Description: A library of various helper routines and frameworks used by many of the lab's software +# URL: https://github.com/KarypisLab/GKlib +# Maintainer: Tim Biermann, tbier at posteo dot de +# Depends on: + +name=gklib +version=20230327 +_commit=8bd6bad750b2b0d90800c632cf18e8ee93ad72d7 +release=1 +source=(https://github.com/KarypisLab/GKlib/archive/$_commit/$name-$_commit.tar.gz + gklib-5.1.1_p20230327-multilib.patch + gklib-5.1.1_p20230327-respect-user-flags.patch) +renames=($name-$version.tar.gz SKIP SKIP) + +build() { + patch -Np1 -d GKlib-* -i $SRC/gklib-5.1.1_p20230327-respect-user-flags.patch + patch -Np1 -d GKlib-* -i $SRC/gklib-5.1.1_p20230327-multilib.patch + + cmake -S GKlib-* -B build -G Ninja \ + -D CMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_INSTALL_LIBDIR=lib \ + -D CMAKE_BUILD_TYPE=Release \ + -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \ + -D CMAKE_C_FLAGS_RELEASE="$CFLAGS -fPIC" \ + -D NO_X86=ON \ + -Wno-dev + cmake --build build + DESTDIR=$PKG cmake --install build +} diff --git a/gklib/gklib-5.1.1_p20230327-multilib.patch b/gklib/gklib-5.1.1_p20230327-multilib.patch new file mode 100644 index 000000000..92fd8024f --- /dev/null +++ b/gklib/gklib-5.1.1_p20230327-multilib.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9cd1b4b..592b70a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,6 +26,6 @@ include_directories("test") + add_subdirectory("test") + + install(TARGETS GKlib +- ARCHIVE DESTINATION lib/${LINSTALL_PATH} +- LIBRARY DESTINATION lib/${LINSTALL_PATH}) ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}/${LINSTALL_PATH} ++ LIBRARY DESTINATION lib${LIB_SUFFIX}/${LINSTALL_PATH}) + install(FILES ${GKlib_includes} DESTINATION include/${HINSTALL_PATH}) diff --git a/gklib/gklib-5.1.1_p20230327-respect-user-flags.patch b/gklib/gklib-5.1.1_p20230327-respect-user-flags.patch new file mode 100644 index 000000000..bbad20ee1 --- /dev/null +++ b/gklib/gklib-5.1.1_p20230327-respect-user-flags.patch @@ -0,0 +1,51 @@ +diff --git a/GKlibSystem.cmake b/GKlibSystem.cmake +index 31a1cf1..15ccfe7 100644 +--- a/GKlibSystem.cmake ++++ b/GKlibSystem.cmake +@@ -31,21 +31,6 @@ endif(CYGWIN) + if(CMAKE_COMPILER_IS_GNUCC) + # GCC opts. + set(GKlib_COPTIONS "${GKlib_COPTIONS} -std=c99 -fno-strict-aliasing") +-if(VALGRIND) +- set(GKlib_COPTIONS "${GK_COPTIONS} -march=x86-64 -mtune=generic") +-else() +-# -march=native is not a valid flag on PPC: +-if(CMAKE_SYSTEM_PROCESSOR MATCHES "power|ppc|powerpc|ppc64|powerpc64" OR (APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc|ppc64")) +- set(GKlib_COPTIONS "${GKlib_COPTIONS} -mtune=native") +-else() +- set(GKlib_COPTIONS "${GKlib_COPTIONS} -march=native") +-endif() +-endif(VALGRIND) +- if(NOT MINGW) +- set(GKlib_COPTIONS "${GKlib_COPTIONS} -fPIC") +- endif(NOT MINGW) +-# GCC warnings. +- set(GKlib_COPTIONS "${GKlib_COPTIONS} -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label") + elseif(${CMAKE_C_COMPILER_ID} MATCHES "Sun") + # Sun insists on -xc99. + set(GKlib_COPTIONS "${GKlib_COPTIONS} -xc99") +@@ -71,24 +56,6 @@ if(NO_X86) + set(GKlib_COPTIONS "${GKlib_COPTIONS} -DNO_X86=${NO_X86}") + endif(NO_X86) + +-# Add various definitions. +-if(GDB) +- set(GKlib_COPTS "${GKlib_COPTS} -g") +- set(GKlib_COPTIONS "${GKlib_COPTIONS} -Werror") +-else() +- set(GKlib_COPTS "-O3") +-endif(GDB) +- +- +-if(DEBUG) +- set(GKlib_COPTS "-g") +- set(GKlib_COPTIONS "${GKlib_COPTIONS} -DDEBUG") +-endif(DEBUG) +- +-if(GPROF) +- set(GKlib_COPTS "-pg") +-endif(GPROF) +- + if(NOT ASSERT) + set(GKlib_COPTIONS "${GKlib_COPTIONS} -DNDEBUG") + endif(NOT ASSERT)
participants (1)
-
crux@crux.nu