diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-06-06 13:13:11 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-06-07 06:04:37 -0300 |
commit | 9feb870df03b03a11cdb85fad08482e998e3be7a (patch) | |
tree | 30c8406cff38dd785aa3f46817f3ca847603d64a | |
parent | 70ee824b277429c6e3a3fd0843b6e1afa48f2b42 (diff) | |
download | aports-9feb870df03b03a11cdb85fad08482e998e3be7a.tar.bz2 aports-9feb870df03b03a11cdb85fad08482e998e3be7a.tar.xz |
testing/libcork: new aport
-rw-r--r-- | testing/libcork/APKBUILD | 45 | ||||
-rw-r--r-- | testing/libcork/fix-dumb-script.patch | 27 |
2 files changed, 72 insertions, 0 deletions
diff --git a/testing/libcork/APKBUILD b/testing/libcork/APKBUILD new file mode 100644 index 0000000000..5df50188dd --- /dev/null +++ b/testing/libcork/APKBUILD @@ -0,0 +1,45 @@ +# Contributor: Leo <thinkabit.ukim@gmail.com> +# Maintainer: Leo <thinkabit.ukim@gmail.com> +pkgname=libcork +pkgver=0.15.0 +pkgrel=0 +pkgdesc="Simple, easily embeddable cross-platform C library" +url="https://github.com/redjack/libcork" +arch="all" +license="BSD-3-Clause" +makedepends="cmake check-dev" +checkdepends="python3" +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/dcreager/libcork/archive/$pkgver.tar.gz + fix-dumb-script.patch + " + +prepare() { + default_prepare + mkdir build + echo "$pkgver" > RELEASE-VERSION + +} + +build() { + cd build + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DENABLE_STATIC=OFF \ + -DCMAKE_INSTALL_LIBDIR=lib + make +} + +check() { + cd build + ctest -E '(shared-test-core|shared-test-file|run-paths-01)' +} + +package() { + cd build + make DESTDIR="$pkgdir" install +} + +sha512sums="8f41cce2101b96707068a21e5bd0a43c23f996c3620e7dd36621ed4bdd3f92851a92ea56ed92db40d7d8fe55ddfbdfcdaac4d2c8b2fc6cb3b1abe3b0e74c6a75 libcork-0.15.0.tar.gz +c80c3edb45e4051b5b3aac4b4980296e54d78bee0410e833278034a9dcdd971f174be01f8420bb94e294bc229e69d13b200679c600ee56920348af94ccd51b45 fix-dumb-script.patch" diff --git a/testing/libcork/fix-dumb-script.patch b/testing/libcork/fix-dumb-script.patch new file mode 100644 index 0000000000..092343c510 --- /dev/null +++ b/testing/libcork/fix-dumb-script.patch @@ -0,0 +1,27 @@ +diff --git a/version.sh b/version.sh +index 40e8d05..be8cd2e 100755 +--- a/version.sh ++++ b/version.sh +@@ -17,17 +17,10 @@ + # Note that the RELEASE-VERSION file should *not* be checked into git; + # please add it to your top-level .gitignore file. + +-version=$(git describe) +-if [ -n ${version} ]; then +- # If we got something from git-describe, write the version to the +- # output file. +- echo ${version} > RELEASE-VERSION +-else +- version=$(cat RELEASE-VERSION) +- if [ -z ${version} ]; then +- echo "Cannot find the version number!" >&2 +- exit 1 +- fi ++version=$(cat RELEASE-VERSION) ++if [ -z ${version} ]; then ++ echo "Cannot find the version number!" >&2 ++ exit 1 + fi + + echo ${version} + |