-
-
Save starius/82a402741d68c0f800b22aa1d28aeeae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 851acb5cf6c1f78bee17cd93195eaaa77f4a6340 Mon Sep 17 00:00:00 2001 | |
| From: nschlia <nschlia@oblivion-software.de> | |
| Date: Tue, 6 Dec 2016 23:37:18 +0100 | |
| Subject: [PATCH 1/3] Add libcddb | |
| --- | |
| docs/index.html | 4 ++ | |
| src/libcddb-1-fixes.patch | 90 +++++++++++++++++++++++++++++++++++++++++++++ | |
| src/libcddb-test.c | 19 ++++++++++ | |
| src/libcddb.mk | 37 +++++++++++++++++++ | |
| 4 files changed, 150 insertions(+) | |
| create mode 100644 src/libcddb-1-fixes.patch | |
| create mode 100644 src/libcddb-test.c | |
| create mode 100644 src/libcddb.mk | |
| diff --git a/docs/index.html b/docs/index.html | |
| index cbb6945..d2eccdd 100644 | |
| --- a/docs/index.html | |
| +++ b/docs/index.html | |
| @@ -1675,6 +1675,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre> | |
| <td class="website"><a href="http://caca.zoy.org/wiki/libcaca">libcaca</a></td> | |
| </tr> | |
| <tr> | |
| + <td class="package">libcddb</td> | |
| + <td class="website"><a href="https://sourceforge.net/projects/libcddb/">Access data on a CDDB</a></td> | |
| + </tr> | |
| + <tr> | |
| <td class="package">libcdio</td> | |
| <td class="website"><a href="https://www.gnu.org/software/libcdio/">Libcdio</a></td> | |
| </tr> | |
| diff --git a/src/libcddb-1-fixes.patch b/src/libcddb-1-fixes.patch | |
| new file mode 100644 | |
| index 0000000..c02e34b | |
| --- /dev/null | |
| +++ b/src/libcddb-1-fixes.patch | |
| @@ -0,0 +1,90 @@ | |
| +This file is part of MXE. See LICENSE.md for licensing information. | |
| + | |
| +Contains ad hoc patches for cross building. | |
| + | |
| +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | |
| +From: Norbert Schlia <nschlia@oblivion-software.de> | |
| +Date: Mon, 12 Dec 2016 08:48:17 +0100 | |
| +Subject: [PATCH] Newer versions winioctl.h contain a #define SEARCH_ALL .. | |
| + which collides with the enum in cddb_conn.h. | |
| + | |
| + | |
| +diff --git a/include/cddb/cddb_conn.h b/include/cddb/cddb_conn.h | |
| +index 1111111..2222222 100644 | |
| +--- a/include/cddb/cddb_conn.h | |
| ++++ b/include/cddb/cddb_conn.h | |
| +@@ -59,6 +59,10 @@ typedef struct cddb_conn_s cddb_conn_t; | |
| + * Which fields to use for the full text search is defined by one or | |
| + * more of the constants below. | |
| + */ | |
| ++#ifdef SEARCH_ALL | |
| ++#undef SEARCH_ALL // Defined in winioctl.h, causes havoc under windoze | |
| ++#endif | |
| ++ | |
| + typedef enum { | |
| + SEARCH_NONE = 0, /**< no fields */ | |
| + SEARCH_ARTIST = 1, /**< artist name field */ | |
| + | |
| +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | |
| +From: Norbert Schlia <nschlia@oblivion-software.de> | |
| +Date: Mon, 12 Dec 2016 08:50:10 +0100 | |
| +Subject: [PATCH] configure falsely detects an alarm() function available, | |
| + causing compile errors. | |
| + | |
| + | |
| +diff --git a/configure b/configure | |
| +index 1111111..2222222 100755 | |
| +--- a/configure | |
| ++++ b/configure | |
| +@@ -13622,7 +13622,7 @@ rm -f conftest* | |
| + | |
| + | |
| + | |
| +-for ac_func in mkdir regcomp socket strdup strtol strchr memset alarm select realloc | |
| ++for ac_func in mkdir regcomp socket strdup strtol strchr memset select realloc | |
| + do | |
| + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
| + { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
| + | |
| +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | |
| +From: Norbert Schlia <nschlia@oblivion-software.de> | |
| +Date: Mon, 12 Dec 2016 08:51:37 +0100 | |
| +Subject: [PATCH] libccdb crashes in strlen() under windows because s = | |
| + getenv("HOME"); returns NULL | |
| + | |
| + | |
| +diff --git a/lib/cddb_conn.c b/lib/cddb_conn.c | |
| +index 1111111..2222222 100644 | |
| +--- a/lib/cddb_conn.c | |
| ++++ b/lib/cddb_conn.c | |
| +@@ -100,6 +100,13 @@ cddb_conn_t *cddb_new(void) | |
| + c->use_cache = CACHE_ON; | |
| + /* construct cache dir '$HOME/[DEFAULT_CACHE]' */ | |
| + s = getenv("HOME"); | |
| ++ if (s == NULL) | |
| ++ s = getenv("TEMP"); | |
| ++ if (s == NULL) | |
| ++ s = getenv("TMP"); | |
| ++ if (s == NULL) | |
| ++ s = "."; | |
| ++ | |
| + c->cache_dir = (char*)malloc(strlen(s) + 1 + sizeof(DEFAULT_CACHE) + 1); | |
| + sprintf(c->cache_dir, "%s/%s", s, DEFAULT_CACHE); | |
| + c->cache_read = FALSE; | |
| + | |
| +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | |
| +From: Boris Nagaev <bnagaev@gmail.com> | |
| +Date: Fri, 16 Dec 2016 03:55:31 +0100 | |
| +Subject: [PATCH] pc: add private libs -lgnurx -lregex -lws2_32 | |
| + | |
| + | |
| +diff --git a/libcddb.pc.in b/libcddb.pc.in | |
| +index 1111111..2222222 100644 | |
| +--- a/libcddb.pc.in | |
| ++++ b/libcddb.pc.in | |
| +@@ -7,4 +7,5 @@ Name: libcddb | |
| + Description: CDDB server access library | |
| + Version: @VERSION@ | |
| + Libs: -L${libdir} -lcddb @LIBICONV@ | |
| ++Libs.private: -L${libdir} -lgnurx -lregex -lws2_32 | |
| + Cflags: -I${includedir} | |
| diff --git a/src/libcddb-test.c b/src/libcddb-test.c | |
| new file mode 100644 | |
| index 0000000..3d7a2f6 | |
| --- /dev/null | |
| +++ b/src/libcddb-test.c | |
| @@ -0,0 +1,19 @@ | |
| +/* | |
| + * This file is part of MXE. See LICENSE.md for licensing information. | |
| + */ | |
| + | |
| +// Based on: http://libcddb.sourceforge.net/tutorial.html | |
| + | |
| +#include <stdio.h> | |
| + | |
| +#include <cddb/cddb.h> | |
| + | |
| +int main() { | |
| + cddb_track_t *track = NULL; | |
| + track = cddb_track_new(); | |
| + if (track == NULL) { | |
| + fprintf(stderr, "out of memory, unable to create track"); | |
| + } | |
| + cddb_track_destroy(track); | |
| + return 0; | |
| +} | |
| diff --git a/src/libcddb.mk b/src/libcddb.mk | |
| new file mode 100644 | |
| index 0000000..2446d49 | |
| --- /dev/null | |
| +++ b/src/libcddb.mk | |
| @@ -0,0 +1,37 @@ | |
| +# This file is part of MXE. See LICENSE.md for licensing information. | |
| + | |
| +PKG := libcddb | |
| +$(PKG)_IGNORE := | |
| +$(PKG)_VERSION := 1.3.2 | |
| +$(PKG)_CHECKSUM := 35ce0ee1741ea38def304ddfe84a958901413aa829698357f0bee5bb8f0a223b | |
| +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) | |
| +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 | |
| +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/libcddb/libcddb/$($(PKG)_VERSION)/$(PKG)-$($(PKG)_VERSION).tar.bz2 | |
| +$(PKG)_DEPS := gcc libiconv libgnurx | |
| + | |
| +define $(PKG)_UPDATE | |
| + $(WGET) -q -O- 'http://downloads.sourceforge.net/project/libcddb/libcddb/' | \ | |
| + $(SED) -n 's,.*libcddb-\([0-9][^>]*\)\.tar.*,\1,p' | \ | |
| + sort | uniq | \ | |
| + head -1 | |
| +endef | |
| + | |
| +# lt_cv_deplibs_check_method="pass_all" allow all libs (avoid static lib creation for x64 because of ws2_32.lib) | |
| +# ac_cv_func_malloc_0_nonnull=yes avoid unresolved external | |
| +# ac_cv_func_realloc_0_nonnull=yes avoid unresolved external | |
| +define $(PKG)_BUILD | |
| + cd '$(BUILD_DIR)' && \ | |
| + lt_cv_deplibs_check_method="pass_all" \ | |
| + ac_cv_func_malloc_0_nonnull=yes \ | |
| + ac_cv_func_realloc_0_nonnull=yes \ | |
| + '$(SOURCE_DIR)'/configure \ | |
| + $(MXE_CONFIGURE_OPTS) | |
| + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS) | |
| + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_PROGRAMS) | |
| + | |
| + # create test binary | |
| + $(TARGET)-gcc \ | |
| + -W -Wall -Werror \ | |
| + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ | |
| + `$(TARGET)-pkg-config libcddb --cflags --libs` | |
| +endef | |
| -- | |
| 1.7.10.4 | |
| From 64b70f6378fd051d2fdefc63a97e718a2f3f9d75 Mon Sep 17 00:00:00 2001 | |
| From: nschlia <nschlia@oblivion-software.de> | |
| Date: Sat, 17 Dec 2016 00:55:35 +0100 | |
| Subject: [PATCH 2/3] Add libdvdetect | |
| --- | |
| docs/index.html | 4 ++++ | |
| src/libdvdetect.mk | 46 ++++++++++++++++++++++++++++++++++++++++++++++ | |
| 2 files changed, 50 insertions(+) | |
| create mode 100644 src/libdvdetect.mk | |
| diff --git a/docs/index.html b/docs/index.html | |
| index d2eccdd..0569a5b 100644 | |
| --- a/docs/index.html | |
| +++ b/docs/index.html | |
| @@ -1695,6 +1695,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre> | |
| <td class="website"><a href="http://www.freespiders.org/projects/libcroco/">Libcroco</a></td> | |
| </tr> | |
| <tr> | |
| + <td class="package">libdvdetect</td> | |
| + <td class="website"><a href="https://www.dvdetect.de/">Fast database lookup for DVDs</a></td> | |
| + </tr> | |
| + <tr> | |
| <td class="package">libdnet</td> | |
| <td class="website"><a href="http://libdnet.sourceforge.net/">libdnet</a></td> | |
| </tr> | |
| diff --git a/src/libdvdetect.mk b/src/libdvdetect.mk | |
| new file mode 100644 | |
| index 0000000..43c134f | |
| --- /dev/null | |
| +++ b/src/libdvdetect.mk | |
| @@ -0,0 +1,46 @@ | |
| +# This file is part of MXE. See LICENSE.md for licensing information. | |
| + | |
| +PKG := libdvdetect | |
| +$(PKG)_IGNORE := | |
| +$(PKG)_VERSION := 0.71.0 | |
| +$(PKG)_CHECKSUM := b098e04660532df78836f50bc0a8044b66c6659b07a6bff6609724ad30a87192 | |
| +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) | |
| +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz | |
| +$(PKG)_URL := https://github.com/nschlia/libdvdetect/releases/download/RELEASE_0_71/$(PKG)-$($(PKG)_VERSION).tar.gz | |
| +$(PKG)_DEPS := gcc tinyxml | |
| + | |
| +define $(PKG)_UPDATE | |
| + $(call MXE_GET_GITHUB_TAGS, libdvdetect/libdvdetect, release-) | |
| +endef | |
| + | |
| +define $(PKG)_BUILD | |
| + cd '$(BUILD_DIR)' && \ | |
| + '$(SOURCE_DIR)'/configure \ | |
| + $(MXE_CONFIGURE_OPTS) | |
| + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' | |
| + $(MAKE) -C '$(BUILD_DIR)/include' -j '$(JOBS)' install | |
| + $(MAKE) -C '$(BUILD_DIR)/lib' -j '$(JOBS)' install | |
| + | |
| + # create pkg-config file | |
| + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' | |
| + (echo 'prefix=$(PREFIX)/$(TARGET)'; \ | |
| + echo 'exec_prefix=$${prefix}'; \ | |
| + echo 'libdir=$${exec_prefix}/lib'; \ | |
| + echo 'includedir=$${prefix}/include'; \ | |
| + echo ''; \ | |
| + echo 'Name: $(PKG)'; \ | |
| + echo 'Version: $($(PKG)_VERSION)'; \ | |
| + echo 'Description: fast database lookup for DVDs'; \ | |
| + echo 'Requires.private: openssl'; \ | |
| + echo 'Libs: -L$${libdir} -ldvdetect -lws2_32'; \ | |
| + echo 'Libs.private: -L$${libdir} -ltinyxml -lstdc++'; \ | |
| + echo 'Cflags: -I$${includedir}'; \ | |
| + ) \ | |
| + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' | |
| + | |
| + # create test binary | |
| + $(TARGET)-gcc \ | |
| + -W -Wall -Werror \ | |
| + '$(SOURCE_DIR)/examples/c/dvdinfo.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ | |
| + `$(TARGET)-pkg-config libdvdetect --cflags --libs` | |
| +endef | |
| -- | |
| 1.7.10.4 | |
| From f4c1fd8a0a7f5ded2fd6f7142646ae30ccea8b49 Mon Sep 17 00:00:00 2001 | |
| From: nschlia <nschlia@oblivion-software.de> | |
| Date: Sat, 17 Dec 2016 00:57:14 +0100 | |
| Subject: [PATCH 3/3] Add neon | |
| --- | |
| docs/index.html | 4 ++++ | |
| src/neon-test.c | 26 ++++++++++++++++++++++++++ | |
| src/neon.mk | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
| 3 files changed, 86 insertions(+) | |
| create mode 100644 src/neon-test.c | |
| create mode 100644 src/neon.mk | |
| diff --git a/docs/index.html b/docs/index.html | |
| index 0569a5b..cbc99d1 100644 | |
| --- a/docs/index.html | |
| +++ b/docs/index.html | |
| @@ -2091,6 +2091,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre> | |
| <td class="website"><a href="https://www.gnu.org/software/ncurses/">Ncurses</a></td> | |
| </tr> | |
| <tr> | |
| + <td class="package">neon</td> | |
| + <td class="website"><a href="http://webdav.org/neon/">HTTP and WebDAV client library (libneon)</a></td> | |
| + </tr> | |
| + <tr> | |
| <td class="package">netcdf</td> | |
| <td class="website"><a href="http://www.unidata.ucar.edu/software/netcdf/">NetCDF</a></td> | |
| </tr> | |
| diff --git a/src/neon-test.c b/src/neon-test.c | |
| new file mode 100644 | |
| index 0000000..9d66506 | |
| --- /dev/null | |
| +++ b/src/neon-test.c | |
| @@ -0,0 +1,26 @@ | |
| +/* | |
| + * This file is part of MXE. See LICENSE.md for licensing information. | |
| + */ | |
| + | |
| +// Based on: http://webdav.org/neon/doc/html/refresolve.html | |
| + | |
| +#include <stdio.h> | |
| + | |
| +#include <neon/ne_basic.h> | |
| + | |
| +int main() { | |
| + ne_sock_addr* addr = ne_addr_resolve("yandex.ru", 0); | |
| + char buf[256]; | |
| + if (ne_addr_result(addr)) { | |
| + printf("Could not resolve yandex.ru: %s\n", | |
| + ne_addr_error(addr, buf, sizeof buf)); | |
| + } else { | |
| + printf("yandex.ru:"); | |
| + for (const ne_inet_addr* ia = ne_addr_first(addr); ia != NULL; ia = ne_addr_next(addr)) { | |
| + printf(" %s", ne_iaddr_print(ia, buf, sizeof buf)); | |
| + } | |
| + printf("\n"); | |
| + } | |
| + ne_addr_destroy(addr); | |
| + return 0; | |
| +} | |
| diff --git a/src/neon.mk b/src/neon.mk | |
| new file mode 100644 | |
| index 0000000..05e03bf | |
| --- /dev/null | |
| +++ b/src/neon.mk | |
| @@ -0,0 +1,56 @@ | |
| +# This file is part of MXE. See LICENSE.md for licensing information. | |
| + | |
| +PKG := neon | |
| +$(PKG)_IGNORE := | |
| +$(PKG)_VERSION := 0.30.2 | |
| +$(PKG)_CHECKSUM := db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca | |
| +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) | |
| +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz | |
| +$(PKG)_URL := http://webdav.org/$(PKG)/$(PKG)-$($(PKG)_VERSION).tar.gz | |
| +$(PKG)_DEPS := gcc openssl expat gettext | |
| + | |
| +define $(PKG)_UPDATE | |
| + $(WGET) -q -O- 'http://webdav.org/$(PKG)/' | \ | |
| + $(SED) -n 's,.*/\([0-9][^"]*\)/"\.tar.*,\1,p' | \ | |
| + sort | uniq | \ | |
| + head -1 | |
| +endef | |
| + | |
| +define $(PKG)_BUILD | |
| + cd '$(BUILD_DIR)' && \ | |
| + ne_cv_fmt_size_t=%lu \ | |
| + ne_cv_fmt_ssize_t=%lu \ | |
| + ne_cv_fmt_off64_t=%I64u \ | |
| + ne_cv_fmt_time_t=%lu \ | |
| + ne_cv_libsfor_socket=-lws2_32 \ | |
| + ne_cv_libsfor_gethostbyname=-lws2_32 \ | |
| + '$(SOURCE_DIR)'/configure \ | |
| + $(MXE_CONFIGURE_OPTS) \ | |
| + $(MXE_DISABLE_DOCS) \ | |
| + --with-ssl=yes | |
| + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' | |
| + $(MAKE) -C '$(BUILD_DIR)' -j 1 install-lib install-headers install-nls | |
| + | |
| + # create pkg-config file | |
| + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' | |
| + (echo 'prefix=$(PREFIX)/$(TARGET)'; \ | |
| + echo 'exec_prefix=$${prefix}'; \ | |
| + echo 'libdir=$${exec_prefix}/lib'; \ | |
| + echo 'includedir=$${prefix}/include'; \ | |
| + echo ''; \ | |
| + echo 'Name: $(PKG)'; \ | |
| + echo 'Version: $($(PKG)_VERSION)'; \ | |
| + echo 'Description: neon is an HTTP and WebDAV client library'; \ | |
| + echo 'Requires.private: openssl'; \ | |
| + echo 'Libs: -L$${libdir} -lneon'; \ | |
| + echo 'Libs.private: -L$${libdir} -lintl -liconv'; \ | |
| + echo 'Cflags: -I$${includedir}'; \ | |
| + ) \ | |
| + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' | |
| + | |
| + # create test binary | |
| + $(TARGET)-gcc \ | |
| + -W -Wall -Werror -std=c11 \ | |
| + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ | |
| + `$(TARGET)-pkg-config neon --cflags --libs` | |
| +endef | |
| -- | |
| 1.7.10.4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment