gklib: initial commit, version 20230327

This commit is contained in:
Tim Biermann 2023-11-27 20:53:44 +01:00
parent bd229f62f3
commit 3291678295
Signed by: tb
GPG Key ID: 42F8B4E30B673606
5 changed files with 126 additions and 0 deletions

26
gklib/.footprint Normal file
View File

@ -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

7
gklib/.signature Normal file
View File

@ -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

29
gklib/Pkgfile Normal file
View File

@ -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
}

View File

@ -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})

View File

@ -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)