summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorSíle Ekaterin Liszka <sheila@vulpine.house>2022-06-10 15:43:36 +0000
committerZach van Rijn <me@zv.io>2022-10-21 18:34:01 -0500
commited96463c8cca7ea6231ee9b5ad8581dc01fcdc7f (patch)
tree4019a9fdde3f5fd523ae9098f4cf1567004b2fbb /user
parenteedf4f0cf4f1335c315f81c90e284d698b8d07be (diff)
downloadpackages-ed96463c8cca7ea6231ee9b5ad8581dc01fcdc7f.tar.gz
packages-ed96463c8cca7ea6231ee9b5ad8581dc01fcdc7f.tar.bz2
packages-ed96463c8cca7ea6231ee9b5ad8581dc01fcdc7f.tar.xz
packages-ed96463c8cca7ea6231ee9b5ad8581dc01fcdc7f.zip
user/fontforge: upgrade to 20220308. fixes #621.
Diffstat (limited to 'user')
-rw-r--r--user/fontforge/APKBUILD52
-rw-r--r--user/fontforge/python3.patch197
2 files changed, 31 insertions, 218 deletions
diff --git a/user/fontforge/APKBUILD b/user/fontforge/APKBUILD
index 960232ba5..87892b38b 100644
--- a/user/fontforge/APKBUILD
+++ b/user/fontforge/APKBUILD
@@ -1,40 +1,50 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=fontforge
-pkgver=2.0.20170731
-pkgrel=1
+pkgver=20220308
+pkgrel=0
pkgdesc="Open source font editor"
url="https://fontforge.github.io/en-US/"
arch="all"
license="GPL-3.0+ AND BSD-3-Clause"
depends="desktop-file-utils shared-mime-info"
-makedepends="freetype-dev giflib-dev glib-dev libjpeg-turbo-dev libtool
- libuninameslist-dev libpng-dev libx11-dev libxml2-dev pango-dev
- python3-dev tiff-dev zlib-dev"
+makedepends="cmake freetype-dev giflib-dev glib-dev libjpeg-turbo-dev
+ libuninameslist-dev libpng-dev libspiro-dev libx11-dev libxi-dev
+ libxml2-dev pango-dev python3-dev tiff-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
-source="https://github.com/fontforge/fontforge/releases/download/${pkgver#2.0.}/fontforge-dist-${pkgver#2.0.}.tar.xz
- python3.patch
- "
+source="https://github.com/fontforge/fontforge/releases/download/$pkgver/fontforge-$pkgver.tar.xz"
build() {
- PYTHON=python3 ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --localstatedir=/var
- make
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DENABLE_GUI=ON \
+ -DENABLE_X11=ON \
+ -DENABLE_PYTHON_SCRIPTING=ON \
+ -DENABLE_PYTHON_EXTENSION=ON \
+ -DENABLE_LIBGIF=ON \
+ -DENABLE_LIBJPEG=ON \
+ -DENABLE_LIBPNG=ON \
+ -DENABLE_LIBTIFF=ON \
+ ${CMAKE_CROSSOPTS} \
+ .
+ make -C build
}
check() {
- # skip test 53; it doesn't work.
- make check TESTSUITEFLAGS="1-52 54"
+ CTEST_OUTPUT_ON_FAILURE=TRUE make -C build test
}
package() {
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" make -C build install
}
-sha512sums="26f7a40714460716a24dd0229fdb027f3766bcc48db64b8993436ddcb6277898f9f3b67ad4fc0be515b2b38e01370d1c7d9ee3c6ece1be862b7d8c9882411f11 fontforge-dist-20170731.tar.xz
-0ca2f3d10a54e4ccb0737ba8e4e768a75e536f70f8892bfe8c23daa5d542d58a1dd4991a982748dcb2c24ed5ae4cb336278a1c01eb434a0463b8b36133b0bb33 python3.patch"
+sha512sums="9975cffec8aa47bcb8c22405bea544cd263dc939b253e8fba2fbaa3b90a60e05b98eaf58365db8ae854d1fff8e641866a7e2e027003ae03a77104d6650dafb6c fontforge-20220308.tar.xz"
diff --git a/user/fontforge/python3.patch b/user/fontforge/python3.patch
deleted file mode 100644
index 25bae415e..000000000
--- a/user/fontforge/python3.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-From b6089f11bd7534c9aa38b875ef1e830fc3b898b4 Mon Sep 17 00:00:00 2001
-From: Jeremy Tan <jtanx@outlook.com>
-Date: Wed, 13 Sep 2017 17:22:18 +0800
-Subject: [PATCH] python: Use PyMem_Free wherever PyArg_ParseTuple+es is used
-
-https://docs.python.org/2.0/ext/parseTuple.html
----
- fontforge/python.c | 62 +++++++++++++++++++++++++++-------------------
- 1 file changed, 38 insertions(+), 27 deletions(-)
-
-diff --git a/fontforge/python.c b/fontforge/python.c
-index 5d6820c40..c6d7aca2b 100644
---- a/fontforge/python.c
-+++ b/fontforge/python.c
-@@ -607,7 +607,13 @@ return( NULL );
- }
- }
-
-- if ( !SetPrefs((char *) prefname,&val,NULL)) {
-+ bool succeeded = SetPrefs((char *) prefname,&val,NULL);
-+ if (val.type == v_str && val.u.sval) {
-+ PyMem_Free(val.u.sval);
-+ val.u.sval = NULL;
-+ }
-+
-+ if (!succeeded) {
- PyErr_Format(PyExc_NameError, "Unknown preference item in SetPrefs: %s", prefname );
- return( NULL );
- }
-@@ -728,7 +734,7 @@ static PyObject *PyFF_UnicodeFromName(PyObject *UNUSED(self), PyObject *args) {
- return( NULL );
-
- ret = Py_BuildValue("i", UniFromName((char *) name, ui_none,&custom));
-- free(name);
-+ PyMem_Free(name);
- return( ret );
- }
-
-@@ -1361,12 +1367,14 @@ Py_RETURN_NONE; /* Well, that was pointless */
- if ( import==Py_None )
- import=NULL;
- else if ( !PyCallable_Check(import) ) {
-+ PyMem_Free(name);
- PyErr_Format(PyExc_TypeError, "First argument is not callable" );
- return( NULL );
- }
- if ( export==Py_None )
- export=NULL;
- else if ( !PyCallable_Check(export) ) {
-+ PyMem_Free(name);
- PyErr_Format(PyExc_TypeError, "Second argument is not callable" );
- return( NULL );
- }
-@@ -1472,7 +1480,7 @@ static PyObject *PyFF_logError(PyObject *UNUSED(self), PyObject *args) {
- if ( !PyArg_ParseTuple(args,"es","UTF-8", &msg) )
- return( NULL );
- LogError(msg);
-- free(msg);
-+ PyMem_Free(msg);
- Py_RETURN_NONE;
- }
-
-@@ -1486,6 +1494,8 @@ static PyObject *PyFF_postError(PyObject *UNUSED(self), PyObject *args) {
- return( NULL );
- if( showPythonErrors )
- ff_post_error(title,msg); /* Prints to stderr if no ui */
-+ PyMem_Free(title);
-+ PyMem_Free(msg);
- Py_RETURN_NONE;
- }
-
-@@ -1494,6 +1504,8 @@ static PyObject *PyFF_postNotice(PyObject *UNUSED(self), PyObject *args) {
- if ( !PyArg_ParseTuple(args,"eses","UTF-8", &title, "UTF-8", &msg) )
- return( NULL );
- ff_post_notice(title,msg); /* Prints to stderr if no ui */
-+ PyMem_Free(title);
-+ PyMem_Free(msg);
- Py_RETURN_NONE;
- }
-
-@@ -1511,8 +1523,8 @@ return( NULL );
- return( NULL );
-
- ret = ff_open_filename(title,def,filter);
-- free(title);
-- free(def);
-+ PyMem_Free(title);
-+ PyMem_Free(def);
- if ( ret==NULL )
- Py_RETURN_NONE;
- reto = DECODE_UTF8(ret,strlen(ret),NULL);
-@@ -1534,8 +1546,8 @@ return( NULL );
- return( NULL );
-
- ret = ff_save_filename(title,def,filter);
-- free(title);
-- free(def);
-+ PyMem_Free(title);
-+ PyMem_Free(def);
- if ( ret==NULL )
- Py_RETURN_NONE;
- reto = DECODE_UTF8(ret,strlen(ret),NULL);
-@@ -1558,8 +1570,8 @@ return( NULL );
- return( NULL );
- if ( !PySequence_Check(answero) || STRING_CHECK(answero)) {
- PyErr_Format(PyExc_TypeError, "Expected a tuple of strings for the third argument");
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- return( NULL );
- }
- cnt = PySequence_Size(answero);
-@@ -1568,16 +1580,16 @@ return( NULL );
- cancel = cnt-1;
- if ( cancel<0 || cancel>=cnt || def<0 || def>=cnt ) {
- PyErr_Format(PyExc_ValueError, "Value out of bounds for 4th or 5th argument");
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- free(answers);
- return( NULL );
- }
- for ( i=0; i<cnt; ++i ) {
- PyObject *utf8_name = PYBYTES_UTF8(PySequence_GetItem(answero,i));
- if ( utf8_name==NULL ) {
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- FreeStringArray( i, answers );
- return( NULL );
- }
-@@ -1587,8 +1599,8 @@ return( NULL );
- answers[cnt] = NULL;
-
- ret = ff_ask(title,(const char **) answers,def,cancel,quest);
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- FreeStringArray( cnt, answers );
- return( Py_BuildValue("i",ret));
- }
-@@ -1608,23 +1620,23 @@ return( NULL );
- return( NULL );
- if ( !PySequence_Check(answero) || STRING_CHECK(answero)) {
- PyErr_Format(PyExc_TypeError, "Expected a tuple of strings for the third argument");
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- return( NULL );
- }
- cnt = PySequence_Size(answero);
- answers = calloc(cnt+1, sizeof(char *));
- if ( def<0 || def>=cnt ) {
- PyErr_Format(PyExc_ValueError, "Value out of bounds for 4th argument");
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- return( NULL );
- }
- for ( i=0; i<cnt; ++i ) {
- PyObject *utf8_name = PYBYTES_UTF8(PySequence_GetItem(answero,i));
- if ( utf8_name==NULL ) {
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- FreeStringArray( i, answers );
- return( NULL );
- }
-@@ -1634,8 +1646,8 @@ return( NULL );
- answers[cnt] = NULL;
-
- ret = ff_choose(title,(const char **) answers,cnt,def,quest);
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- FreeStringArray( cnt, answers );
- return( Py_BuildValue("i",ret));
- }
-@@ -1654,8 +1666,8 @@ return( NULL );
- return( NULL );
-
- ret = ff_ask_string(title,def,quest);
-- free(title);
-- free(quest);
-+ PyMem_Free(title);
-+ PyMem_Free(quest);
- free(def);
- if ( ret==NULL )
- Py_RETURN_NONE;