From 233a03fa19c753610e3ef211cacb1f6d4a8fa6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Thu, 4 Jan 2018 09:19:17 +0100 Subject: [PATCH] New package: calc-2.12.6.0 Closes: #9106 --- common/shlibs | 2 ++ srcpkgs/calc/files/musl.patch | 26 ++++++++++++++++++++++ srcpkgs/calc/template | 41 +++++++++++++++++++++++++++++++++++ srcpkgs/libcalc | 1 + srcpkgs/libcalc-devel | 1 + 5 files changed, 71 insertions(+) create mode 100644 srcpkgs/calc/files/musl.patch create mode 100644 srcpkgs/calc/template create mode 120000 srcpkgs/libcalc create mode 120000 srcpkgs/libcalc-devel diff --git a/common/shlibs b/common/shlibs index c2c5d4c50fe..f00b932a5cc 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3025,6 +3025,8 @@ libr_crypto.so radare2-2.2.0_1 libr_fs.so radare2-2.2.0_1 libr_magic.so radare2-2.2.0_1 libr_reg.so radare2-2.2.0_1 +libcalc.so.2.12.6.0 libcalc-2.12.6.0_1 +libcustcalc.so.2.12.6.0 libcalc-2.12.6.0_1 libykpiv.so.1 libykpiv-1.5.0_1 libykcs11.so.1 libykcs11-1.5.0_1 libKF5KExiv2.so.15.0.0 libkexiv25-17.04.3_1 diff --git a/srcpkgs/calc/files/musl.patch b/srcpkgs/calc/files/musl.patch new file mode 100644 index 00000000000..2dffadb8aa5 --- /dev/null +++ b/srcpkgs/calc/files/musl.patch @@ -0,0 +1,26 @@ +diff --git Makefile Makefile +index 8b68804..db24dce 100644 +--- Makefile ++++ Makefile +@@ -156,8 +156,8 @@ LONG_BITS= + # + # If in doubt, leave HAVE_FPOS empty and this Makefile will figure it out. + # +-HAVE_FPOS= +-#HAVE_FPOS= -DHAVE_NO_FPOS ++#HAVE_FPOS= ++HAVE_FPOS= -DHAVE_NO_FPOS + + # Determine if we have an __pos element of a file position (fpos_t) structure. + # +@@ -169,8 +169,8 @@ HAVE_FPOS= + # + # If in doubt, leave HAVE_FPOS_POS empty and this Makefile will figure it out. + # +-HAVE_FPOS_POS= +-#HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS ++#HAVE_FPOS_POS= ++HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS + + # Determine the size of the __pos element in fpos_t, if it exists. + # diff --git a/srcpkgs/calc/template b/srcpkgs/calc/template new file mode 100644 index 00000000000..425900df8de --- /dev/null +++ b/srcpkgs/calc/template @@ -0,0 +1,41 @@ +# Template file for 'calc' +pkgname=calc +version=2.12.6.0 +revision=1 +build_style=gnu-makefile +make_install_args="T=$""{DESTDIR}" +short_desc="C-style arbitrary precision calculator" +maintainer="Piotr Wójcik " +license="LGPL-2.1" +homepage="http://www.isthe.com/chongo/tech/comp/calc/index.html" +distfiles="http://www.isthe.com/chongo/src/calc/calc-${version}.tar.bz2" +checksum=18dee9d979d8d397ee4a6f57c494a60790034c0ff109b3c552faff97f1ad7cf2 +disable_parallel_build=yes + +post_extract() { + case $XBPS_TARGET_MACHINE in + *-musl) patch -Np0 < ${FILESDIR}/musl.patch ;; + esac +} + +do_build() { + make ${makejobs} ${make_build_args} ${make_build_target} \ + CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" RANLIB="$RANLIB" \ + CPP="$CPP" AS="$AS" OBJDUMP="$OBJDUMP" LDFLAGS="$LDFLAGS" +} + +libcalc_package() { + short_desc+=" - runtime library" + pkg_install() { + vmove usr/lib/*.so.* + } +} + +libcalc-devel_package() { + depends="lib${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/*.so + } +} diff --git a/srcpkgs/libcalc b/srcpkgs/libcalc new file mode 120000 index 00000000000..ea90b63037b --- /dev/null +++ b/srcpkgs/libcalc @@ -0,0 +1 @@ +calc \ No newline at end of file diff --git a/srcpkgs/libcalc-devel b/srcpkgs/libcalc-devel new file mode 120000 index 00000000000..ea90b63037b --- /dev/null +++ b/srcpkgs/libcalc-devel @@ -0,0 +1 @@ +calc \ No newline at end of file