diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-05-07 09:23:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 09:23:44 +0200 |
commit | c989366b228ed6be73b0416d29ece07408a09a9e (patch) | |
tree | 6849d3bd697d7bfa4af7f96dff1649078abee763 /pkgs/development | |
parent | fc8162a69bafc6d71a53c35c6470ee57ece4c66d (diff) | |
parent | 254fb39b9f066937dbabbe2592a8b691b36b2050 (diff) |
Merge pull request #121857 from dotlambda/presage-init
presage: init at 0.9.1
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/presage/default.nix | 69 | ||||
-rw-r--r-- | pkgs/development/libraries/presage/fixed-cppunit-detection.patch | 46 |
2 files changed, 115 insertions, 0 deletions
diff --git a/pkgs/development/libraries/presage/default.nix b/pkgs/development/libraries/presage/default.nix new file mode 100644 index 0000000000000..df15e73f73cf9 --- /dev/null +++ b/pkgs/development/libraries/presage/default.nix @@ -0,0 +1,69 @@ +{ lib +, stdenv +, fetchurl +, fetchpatch +, autoreconfHook +, dbus +, doxygen +, fontconfig +, gettext +, graphviz +, help2man +, pkg-config +, sqlite +, tinyxml +, cppunit +}: + +stdenv.mkDerivation rec { + pname = "presage"; + version = "0.9.1"; + + src = fetchurl { + url = "mirror://sourceforge/presage/presage/${version}/presage-${version}.tar.gz"; + sha256 = "0rm3b3zaf6bd7hia0lr1wyvi1rrvxkn7hg05r5r1saj0a3ingmay"; + }; + + patches = [ + (fetchpatch { + url = "https://git.alpinelinux.org/aports/plain/community/presage/gcc6.patch"; + sha256 = "0243nx1ygggmsly7057vndb4pkjxg9rpay5gyqqrq9jjzjzh63dj"; + }) + ./fixed-cppunit-detection.patch + ]; + + nativeBuildInputs = [ + autoreconfHook + doxygen + fontconfig + gettext + graphviz + help2man + pkg-config + ]; + + preBuild = '' + export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf + ''; + + buildInputs = [ + dbus + sqlite + tinyxml + ]; + + checkInputs = [ + cppunit + ]; + + doCheck = true; + + checkTarget = "check"; + + meta = with lib; { + description = "An intelligent predictive text entry system"; + homepage = "https://presage.sourceforge.io/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/libraries/presage/fixed-cppunit-detection.patch b/pkgs/development/libraries/presage/fixed-cppunit-detection.patch new file mode 100644 index 0000000000000..27238d2956d18 --- /dev/null +++ b/pkgs/development/libraries/presage/fixed-cppunit-detection.patch @@ -0,0 +1,46 @@ +From 5624aa156c551ab2b81bb86279844397ed690653 Mon Sep 17 00:00:00 2001 +From: Matteo Vescovi <matteo.vescovi@yahoo.co.uk> +Date: Sun, 21 Jan 2018 17:17:12 +0000 +Subject: [PATCH] Fixed cppunit detection. + +--- + configure.ac | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a02e9f1..1538a51 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -204,10 +204,16 @@ AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"]) + dnl ================== + dnl Checks for CppUnit + dnl ================== +-AM_PATH_CPPUNIT([1.9.6], +- [], +- [AC_MSG_WARN([CppUnit not found. Unit tests will not be built. CppUnit can be obtained from http://cppunit.sourceforge.net.])]) +-AM_CONDITIONAL([HAVE_CPPUNIT], [test "$CPPUNIT_LIBS"]) ++PKG_CHECK_MODULES([CPPUNIT], ++ [cppunit >= 1.9], ++ [have_cppunit=yes], ++ [AM_PATH_CPPUNIT([1.9], ++ [have_cppunit=yes], ++ [AC_MSG_WARN([CppUnit not found. Unit tests will not be built. CppUnit can be obtained from http://cppunit.sourceforge.net.])]) ++ ]) ++AC_SUBST([CPPUNIT_CFLAGS]) ++AC_SUBST([CPPUNIT_LIBS]) ++AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$have_cppunit" = "xyes"]) + + + dnl ============================ +@@ -592,7 +598,7 @@ then + else + build_demo_application="no" + fi +-if test "$CPPUNIT_LIBS" ++if test "x$have_cppunit" = "xyes" + then + build_unit_tests="yes" + else +-- +2.31.1 + |