From 54dacdb16855a89036764b2f27c3924e2e99a59e Mon Sep 17 00:00:00 2001 From: darealshinji Date: Thu, 21 Jul 2016 14:50:07 +0200 Subject: New package 'libspectre' --- index.html | 4 ++++ src/libspectre-1-fixes.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++ src/libspectre-test.c | 23 ++++++++++++++++++++ src/libspectre.mk | 32 ++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 src/libspectre-1-fixes.patch create mode 100644 src/libspectre-test.c create mode 100644 src/libspectre.mk diff --git a/index.html b/index.html index 880986c..ecee297 100644 --- a/index.html +++ b/index.html @@ -1906,6 +1906,10 @@ local-pkg-list: $(LOCAL_PKG_LIST) libsoup + libspectre + libspectre + + libssh2 libssh2 diff --git a/src/libspectre-1-fixes.patch b/src/libspectre-1-fixes.patch new file mode 100644 index 0000000..50a1d7a --- /dev/null +++ b/src/libspectre-1-fixes.patch @@ -0,0 +1,50 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: darealshinji +Date: Thu, 21 Jul 2016 12:00:00 +0200 +Subject: [PATCH] add PKG_CHECK_MODULES macro to configure.ac + + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -65,6 +65,7 @@ AC_CHECK_FUNC(_vscprintf, [ AC_DEFINE(HAVE__VSCPRINTF, 1, [Define if the '_vscpr + + LIBGS_REQUIRED="8.62" + ++PKG_CHECK_MODULES(GHOSTSCRIPT, [ghostscript >= $LIBGS_REQUIRED], [LIB_GS="$GHOSTSCRIPT_LIBS"], [ + AC_CHECK_LIB(gs, gsapi_new_instance, have_libgs=yes, have_libgs=no) + if test "x$have_libgs" = "xyes"; then + LIB_GS="-lgs" +@@ -97,6 +98,7 @@ if test "x$have_libgs" = "xyes"; then + else + AC_MSG_ERROR([You need libgs in order to compile libspectre]) + fi ++]) + AC_SUBST(LIB_GS) + + AC_ARG_ENABLE(asserts, + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: darealshinji +Date: Thu, 21 Jul 2016 12:00:00 +0200 +Subject: [PATCH] enable out-of-tree builds + + +diff --git a/libspectre/Makefile.am b/libspectre/Makefile.am +index 1111111..2222222 100644 +--- a/libspectre/Makefile.am ++++ b/libspectre/Makefile.am +@@ -42,6 +42,7 @@ libspectre_la_SOURCES = \ + $(gv_sources) + + libspectre_la_CPPFLAGS = \ ++ -I@top_srcdir@ \ + $(SPECTRE_CFLAGS) + + libspectre_la_LIBADD = $(LIB_GS) diff --git a/src/libspectre-test.c b/src/libspectre-test.c new file mode 100644 index 0000000..79f521e --- /dev/null +++ b/src/libspectre-test.c @@ -0,0 +1,23 @@ +/* + * This file is part of MXE. + * See index.html for further information. + */ + +#include + +int main(int argc, char *argv[]) +{ + SpectreDocument *document; + SpectreRenderContext *rc; + + (void)argc; + (void)argv; + + document = spectre_document_new(); + rc = spectre_render_context_new(); + + spectre_document_free(document); + spectre_render_context_free(rc); + + return 0; +} diff --git a/src/libspectre.mk b/src/libspectre.mk new file mode 100644 index 0000000..f3b1ae5 --- /dev/null +++ b/src/libspectre.mk @@ -0,0 +1,32 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := libspectre +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.2.8 +$(PKG)_CHECKSUM := 65256af389823bbc4ee4d25bfd1cc19023ffc29ae9f9677f2d200fa6e98bc7a8 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://libspectre.freedesktop.org/releases/$($(PKG)_FILE) +$(PKG)_DEPS := gcc cairo ghostscript + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://libspectre.freedesktop.org/releases/' | \ + $(SED) -n 's:.*>LATEST-libspectre-::p' | \ + $(SED) -n 's:<.*::p' +endef + +define $(PKG)_BUILD + cd '$(SOURCE_DIR)' && autoreconf -f -i + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-silent-rules \ + --enable-test + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' install + echo "Requires: cairo ghostscript" >> '$(PREFIX)/$(TARGET)/lib/pkgconfig/libspectre.pc' + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef -- cgit v0.12