diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index 81bfce6..56a60f2 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -11,36 +11,31 @@ arch=('x86_64') license=('GPL') url="http://live.gnome.org/Dia" depends=('libxslt' 'gtk2') -makedepends=('intltool' 'python2' 'docbook-xsl') +makedepends=('intltool' 'docbook-xsl') # See https://github.com/GNOME/dia/commit/75ca7c555871f12549a03e9a2933f68c31a2c2a0 -# Patches for python3, but no releases. We remove optdepends regardless -#optdepends=('python') options=('docs' '!emptydirs') source=("https://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.97/${pkgname}-${pkgver}.tar.xz" - 'dia-0.9.3-cve-2019-19451.patch') + 'dia-0.9.3-cve-2019-19451.patch' + 'dia-0.97-replace-freetype-config-with-pkg-config.patch') sha256sums=('22914e48ef48f894bb5143c5efc3d01ab96e0a0cde80de11058d3b4301377d34' - '32cecad212fbd0f87f304d9eaf48f8b3d6555b10733ead5a3943bac778bf8586') + '32cecad212fbd0f87f304d9eaf48f8b3d6555b10733ead5a3943bac778bf8586' + 'b55fcebab155c59a36e02f6dad58553f55141054395261ecd2525eca4c5fcf4c') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" - for file in `find -type f -name '*.py'`; do - sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' "$file" - done - sed -i 's#python2\.1#python2 python2.1#' configure - sed -i 's#freetype-config --cflags#pkg-config --cflags freetype2#' configure - sed -i 's#freetype-config --libs#pkg-config --libs freetype2#' configure # FS#71257 patch -Np1 -i "${srcdir}/dia-0.9.3-cve-2019-19451.patch" + patch -Np1 -i "${srcdir}/dia-0.97-replace-freetype-config-with-pkg-config.patch" } build() { cd "${srcdir}/${pkgname}-${pkgver}" + autoreconf -fi - export PYTHON=/usr/bin/python2 ./configure --prefix=/usr \ --with-cairo \ - --with-python \ + --without-python \ --disable-gnome \ --with-hardbooks sed -i 's#SUBDIRS = lib objects plug-ins shapes app bindings samples po sheets data doc tests installer#SUBDIRS = lib objects plug-ins shapes app bindings samples po sheets data tests installer#' Makefile diff --git a/trunk/dia-0.97-replace-freetype-config-with-pkg-config.patch b/trunk/dia-0.97-replace-freetype-config-with-pkg-config.patch new file mode 100644 index 0000000..1503c59 --- /dev/null +++ b/trunk/dia-0.97-replace-freetype-config-with-pkg-config.patch @@ -0,0 +1,84 @@ +commit 23ca174257b22e478955293666a263dc68e184b3 +Author: Lars Wendler +Date: Tue Jun 12 12:22:19 2018 +0200 + + Replace freetype-config with pkg-config + + As of freetype-2.9.1 the freetype-config script no longer gets installed + by default. + + (cherry picked from commit 821a19a863b38f505495f0d51189d17c546310a3) + + Conflicts: + configure.in + +diff --git a/configure.in b/configure.in +index c5edeeddf..580088ae7 100644 +--- a/configure.in ++++ b/configure.in +@@ -61,44 +61,27 @@ PKG_CHECK_MODULES(PANGOVERSION, pango >= 1.8.0, , + AC_MSG_ERROR([Need Pango version 1.8.0 or higher])) + + AC_ARG_WITH(freetype, +-[ --without-freetype compile without FreeType support],,with_freetype=yes) +-if test "x$with_freetype" = "xyes"; then +-PKG_CHECK_MODULES(PANGOFT2,pangoft2,have_pangoft2=true,have_pangoft2=false) +-if test "$have_pangoft2" = "true"; then +- dnl On Solaris with Forte C, at least, need to link app/dia with -lfreetype. +- dnl It's not enough that -lpangoft2 implicitly pulls it in. +- have_freetype=false +- AC_CHECK_LIB(freetype,FT_Init_FreeType,have_freetype=true,have_freetype=false,`freetype-config --libs`) +- if test "$have_freetype" = "true"; then +- dnl Need 2.0.9, as a bug was fixed for us there. +- dnl However, freetype-config doesn't give a meaningful version, so we must +- dnl do it like this. +- AC_MSG_CHECKING([if FreeType version is 2.0.9 or higher]) +- old_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS `freetype-config --cflags`" +- AC_TRY_CPP([#include +-#include FT_FREETYPE_H +-#if (FREETYPE_MAJOR*1000+FREETYPE_MINOR)*1000+FREETYPE_PATCH < 2000009 +-#error Freetype version too low. +-#endif +-], +- [AC_MSG_RESULT(yes) +- FREETYPE_LIBS=`freetype-config --libs` +- AC_SUBST(FREETYPE_LIBS) +- FREETYPE_CFLAGS=`freetype-config --cflags` +- AC_SUBST(FREETYPE_CFLAGS) +- GTK_MODULES="$GTK_MODULES pangoft2" +- AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])] +- , +- [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])]) +- CPPFLAGS="$old_CPPFLAGS" +- else +- AC_MSG_ERROR(Can't find FreeType library) +- fi +-else +- AC_MSG_ERROR(Can't find PangoFT2 library) +-fi +-fi ++ AC_HELP_STRING([--without-freetype],[compile without FreeType support]),,with_freetype=yes) ++AS_IF([test "x$with_freetype" = "xyes"],[ ++ dnl freetype2.pc uses the libtool specific version number and not the ++ dnl package version. See ++ dnl https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT ++ dnl Let's raise minimum dependency to freetype-2.4.0 because that's the ++ dnl lowest freetype libtool version I could find. ++ dnl freetype-2.4.0 is from July 2010 and should be reasonably old ++ dnl enough. ++ PKG_CHECK_MODULES(FREETYPE, freetype2 >= 11.0.5, ++ [ ++ CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" ++ AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library]) ++ ], ++ AC_MSG_ERROR([Need FreeType library version 2.4.0 or higher]) ++ ) ++ PKG_CHECK_MODULES(PANGOFT2,pangoft2, ++ GTK_MODULES="$GTK_MODULES pangoft2", ++ AC_MSG_ERROR(Can't find PangoFT2 library) ++ ) ++]) + AM_CONDITIONAL(WITH_FREETYPE, test "x$with_freetype" != "xno") + + CFLAGS="$FREETYPE_CFLAGS $CFLAGS"