From 285e221c5d392f0d118a138426ef145b071adc4c Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Mon, 25 Apr 2016 10:37:14 -0700 Subject: [PATCH] libmtp: add package --- .../depends/libmtp/package.mk | 36 +++++++ ...mtp-0001-dont-execute-compiled-tools.patch | 99 +++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 packages/addons/addon-depends/system-tools-depends/depends/libmtp/package.mk create mode 100644 packages/addons/addon-depends/system-tools-depends/depends/libmtp/patches/libmtp-0001-dont-execute-compiled-tools.patch diff --git a/packages/addons/addon-depends/system-tools-depends/depends/libmtp/package.mk b/packages/addons/addon-depends/system-tools-depends/depends/libmtp/package.mk new file mode 100644 index 0000000000..a2f1b015da --- /dev/null +++ b/packages/addons/addon-depends/system-tools-depends/depends/libmtp/package.mk @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of LibreELEC - http://www.libreelec.tv +# Copyright (C) 2016 Team LibreELEC +# +# LibreELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# LibreELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreELEC. If not, see . +################################################################################ + +PKG_NAME="libmtp" +PKG_VERSION="1.1.11" +PKG_REV="3" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://libmtp.sourceforge.net/" +PKG_URL="$SOURCEFORGE_SRC/project/$PKG_NAME/$PKG_NAME/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain libusb" +PKG_SECTION="libs" +PKG_PRIORITY="optional" +PKG_SHORTDESC="MTP library" +PKG_LONGDESC="libmtp is an Initiator implementation of the Media Transfer Protocol (MTP) in the form of a library suitable primarily for POSIX compliant operating systems. We implement MTP Basic, the stuff proposed for standardization." +PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \ + --disable-shared \ + --enable-static \ + --disable-mtpz" diff --git a/packages/addons/addon-depends/system-tools-depends/depends/libmtp/patches/libmtp-0001-dont-execute-compiled-tools.patch b/packages/addons/addon-depends/system-tools-depends/depends/libmtp/patches/libmtp-0001-dont-execute-compiled-tools.patch new file mode 100644 index 0000000000..639b72f018 --- /dev/null +++ b/packages/addons/addon-depends/system-tools-depends/depends/libmtp/patches/libmtp-0001-dont-execute-compiled-tools.patch @@ -0,0 +1,99 @@ +diff -Naur a/Makefile.am b/Makefile.am +--- a/Makefile.am 2015-10-07 00:43:15.000000000 -0700 ++++ b/Makefile.am 2016-04-22 14:16:07.656866841 -0700 +@@ -11,21 +11,6 @@ + if USE_LINUX + udevrulesdir=@UDEV@/rules.d + hwdbdir=@UDEV@/hwdb.d +-udevrules_DATA=@UDEV_RULES@ +-hwdb_DATA=69-libmtp.hwdb +-noinst_DATA=libmtp.usermap libmtp.fdi +- +-libmtp.usermap: util/mtp-hotplug +- util/mtp-hotplug > libmtp.usermap +- +-@UDEV_RULES@: util/mtp-hotplug +- util/mtp-hotplug -u -p"@UDEV@" @UDEV_GROUP@ @UDEV_MODE@ > @UDEV_RULES@ +- +-libmtp.fdi: util/mtp-hotplug +- util/mtp-hotplug -H > libmtp.fdi +- +-$(hwdb_DATA): util/mtp-hotplug +- util/mtp-hotplug -w > $(hwdb_DATA) + + CLEANFILES = libmtp.usermap @UDEV_RULES@ libmtp.fdi libmtp.hwdb + endif +diff -Naur a/Makefile.in b/Makefile.in +--- a/Makefile.in 2016-02-10 12:17:34.000000000 -0800 ++++ b/Makefile.in 2016-04-22 14:14:22.638794537 -0700 +@@ -161,7 +161,7 @@ + } + am__installdirs = "$(DESTDIR)$(hwdbdir)" "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(udevrulesdir)" +-DATA = $(hwdb_DATA) $(noinst_DATA) $(pkgconfig_DATA) $(udevrules_DATA) ++DATA = $(pkgconfig_DATA) + RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive + am__recursive_targets = \ +@@ -452,21 +452,8 @@ + + distclean-libtool: + -rm -f libtool config.lt +-install-hwdbDATA: $(hwdb_DATA) +- @$(NORMAL_INSTALL) +- @list='$(hwdb_DATA)'; test -n "$(hwdbdir)" || list=; \ +- if test -n "$$list"; then \ +- echo " $(MKDIR_P) '$(DESTDIR)$(hwdbdir)'"; \ +- $(MKDIR_P) "$(DESTDIR)$(hwdbdir)" || exit 1; \ +- fi; \ +- for p in $$list; do \ +- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- echo "$$d$$p"; \ +- done | $(am__base_list) | \ +- while read files; do \ +- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(hwdbdir)'"; \ +- $(INSTALL_DATA) $$files "$(DESTDIR)$(hwdbdir)" || exit $$?; \ +- done ++install-hwdbDATA: ++ echo nope + + uninstall-hwdbDATA: + @$(NORMAL_UNINSTALL) +@@ -871,7 +858,7 @@ + + info-am: + +-install-data-am: install-hwdbDATA install-pkgconfigDATA \ ++install-data-am: install-pkgconfigDATA \ + install-udevrulesDATA + + install-dvi: install-dvi-recursive +@@ -932,7 +919,7 @@ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ +- install-html install-html-am install-hwdbDATA install-info \ ++ install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + install-udevrulesDATA installcheck installcheck-am installdirs \ +@@ -944,19 +931,6 @@ + + .PRECIOUS: Makefile + +- +-@USE_LINUX_TRUE@libmtp.usermap: util/mtp-hotplug +-@USE_LINUX_TRUE@ util/mtp-hotplug > libmtp.usermap +- +-@USE_LINUX_TRUE@@UDEV_RULES@: util/mtp-hotplug +-@USE_LINUX_TRUE@ util/mtp-hotplug -u -p"@UDEV@" @UDEV_GROUP@ @UDEV_MODE@ > @UDEV_RULES@ +- +-@USE_LINUX_TRUE@libmtp.fdi: util/mtp-hotplug +-@USE_LINUX_TRUE@ util/mtp-hotplug -H > libmtp.fdi +- +-@USE_LINUX_TRUE@$(hwdb_DATA): util/mtp-hotplug +-@USE_LINUX_TRUE@ util/mtp-hotplug -w > $(hwdb_DATA) +- + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: