summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-26 15:13:35 +0000
committerSam James <sam@gentoo.org>2021-03-26 15:17:54 +0000
commit69adff245f4864fd2cfcb4c930d1ead85a57510f (patch)
tree96097e618a219575b10028e646964636a66d083f /media-libs/libmp3splt
parentsys-boot/grub: add warning about os-prober (diff)
downloadgentoo-69adff245f4864fd2cfcb4c930d1ead85a57510f.tar.gz
gentoo-69adff245f4864fd2cfcb4c930d1ead85a57510f.tar.bz2
gentoo-69adff245f4864fd2cfcb4c930d1ead85a57510f.zip
media-libs/libmp3splt: drop libltdl (better)
Revbump for an improved patch to fully drop libltdl. Thanks-to: Ørjan Malde (Redfoxmoon) <red@foxi.me> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/libmp3splt')
-rw-r--r--media-libs/libmp3splt/files/libmp3splt-0.9.2-drop-libltdl.patch205
-rw-r--r--media-libs/libmp3splt/files/libmp3splt-0.9.2-fix-implicit-decl.patch304
-rw-r--r--media-libs/libmp3splt/libmp3splt-0.9.2-r3.ebuild65
3 files changed, 574 insertions, 0 deletions
diff --git a/media-libs/libmp3splt/files/libmp3splt-0.9.2-drop-libltdl.patch b/media-libs/libmp3splt/files/libmp3splt-0.9.2-drop-libltdl.patch
new file mode 100644
index 000000000000..c29376e3aa66
--- /dev/null
+++ b/media-libs/libmp3splt/files/libmp3splt-0.9.2-drop-libltdl.patch
@@ -0,0 +1,205 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -42,7 +42,7 @@
+
+ AC_PREREQ([2.62])
+ AC_INIT([libmp3splt],[libmp3splt_version],[m@ioalex.net])
+-AC_CONFIG_AUX_DIR([libltdl/config])
++LT_INIT
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_HEADERS([config.h])
+ AM_MAINTAINER_MODE([enable])
+@@ -78,20 +78,6 @@
+ AC_DEFINE_UNQUOTED([SPLT_SONAME], "$SONAME", [library SONAME])
+
+ #################################################################
+-# Enable libtool, check for libltdl and define @LIBLTDL@ and @INCLTDL@
+-#################################################################
+-
+-ifdef([LT_CONFIG_LTDL_DIR],
+- [ LT_CONFIG_LTDL_DIR([libltdl]) ],
+- [])
+-
+-ifdef([LT_INIT],
+- [ LT_INIT([win32-dll]) ],
+- [ AC_PROG_LIBTOOL ])
+-
+-AC_WITH_LTDL
+-
+-#################################################################
+ # Check for the type of the host
+ #################################################################
+
+@@ -161,9 +147,6 @@
+ #check for -lm
+ AC_CHECK_LIB(m, pow, [ haslm="yes" ] , [ AC_MSG_ERROR([libm not found !]) ] )
+
+-#check for -ltld
+-AC_CHECK_LIB(ltdl, lt_dlopen, [ hasltdl="yes" ], [ AC_MSG_ERROR([libltdl not found - check libtool installation !]) ] )
+-
+ #################################################################
+ # helper for windows compilation
+ #################################################################
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -3,7 +3,7 @@
+ include_HEADERS = $(top_srcdir)/include/libmp3splt/mp3splt.h \
+ $(top_srcdir)/include/libmp3splt/version.h
+
+-INCLUDES=-DSPLT_PLUGINS_DIR=\"$(libdir)/libmp3splt$(SONAME)\" -DLIBMP3SPLT_VERSION=\"$(VERSION)\" @INCLTDL@
++INCLUDES=-DSPLT_PLUGINS_DIR=\"$(libdir)/libmp3splt$(SONAME)\" -DLIBMP3SPLT_VERSION=\"$(VERSION)\"
+
+ lib_LTLIBRARIES = libmp3splt.la
+
+@@ -30,8 +30,6 @@
+
+ libmp3splt_la_LIBADD += -lws2_32 -lintl -lshlwapi
+
+-else
+-libmp3splt_la_LIBADD += @LIBLTDL@
+ endif
+
+ libmp3splt_la_SOURCES = \
+--- a/src/mp3splt.c
++++ b/src/mp3splt.c
+@@ -45,7 +45,7 @@
+ #include <sys/stat.h>
+ #include <string.h>
+
+-#include <ltdl.h>
++#include <dlfcn.h>
+
+ #include "splt.h"
+
+@@ -119,13 +119,6 @@
+ int *err = &erro;
+ if (error != NULL) { err = error; }
+
+- if (lt_dlinit() != 0)
+- {
+- *err = SPLT_ERROR_CANNOT_INIT_LIBLTDL;
+- }
+- else
+- {
+-
+ #ifdef ENABLE_NLS
+ #ifndef __WIN32__
+ bindtextdomain(MP3SPLT_LIB_GETTEXT_DOMAIN, LOCALEDIR);
+@@ -135,8 +128,7 @@
+ #endif
+ #endif
+
+- state = splt_t_new_state(state, err);
+- }
++ state = splt_t_new_state(state, err);
+
+ return state;
+ }
+--- a/src/plugins.c
++++ b/src/plugins.c
+@@ -37,7 +37,7 @@
+ #include <dirent.h>
+ #include <errno.h>
+
+-#include <ltdl.h>
++#include <dlfcn.h>
+ #include <stdlib.h>
+
+ #ifdef __WIN32__
+@@ -400,7 +400,7 @@
+ }
+ if (pl_data->plugin_handle)
+ {
+- lt_dlclose(pl_data->plugin_handle);
++ dlclose(pl_data->plugin_handle);
+ pl_data->plugin_handle = NULL;
+ }
+ if (pl_data->func)
+@@ -477,13 +477,12 @@
+ splt_d_print_debug(state,"\nTrying to open the plugin _%s_ ...\n",
+ pl->data[i].plugin_filename);
+
+- //ltdl currently does not supports windows unicode path/filename
+- pl->data[i].plugin_handle = lt_dlopen(pl->data[i].plugin_filename);
++ pl->data[i].plugin_handle = dlopen(pl->data[i].plugin_filename, RTLD_NOW);
+ //error
+ if (! pl->data[i].plugin_handle)
+ {
+ splt_d_print_debug(state,"Error loading the plugin _%s_\n", pl->data[i].plugin_filename);
+- splt_d_print_debug(state," - error message from libltdl: _%s_\n", lt_dlerror());
++ splt_d_print_debug(state," - error message from dlopen: _%s_\n", dlerror());
+
+ //keep the index of this failed plugin in order to remove it
+ //afterwards
+@@ -503,7 +502,7 @@
+ splt_d_print_debug(state," - success !\n");
+
+ pl->data[i].func->splt_pl_set_plugin_info =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_set_plugin_info");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_set_plugin_info");
+ if (pl->data[i].func->splt_pl_set_plugin_info != NULL)
+ {
+ pl->data[i].func->splt_pl_set_plugin_info(&pl->data[i].info,&error);
+@@ -613,34 +612,34 @@
+ int err = 0;
+ for (i = 0;i < pl->number_of_plugins_found;i++)
+ {
+- pl->data[i].plugin_handle = lt_dlopen(pl->data[i].plugin_filename);
++ pl->data[i].plugin_handle = dlopen(pl->data[i].plugin_filename, RTLD_NOW);
+
+ pl->data[i].func->splt_pl_check_plugin_is_for_file =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_check_plugin_is_for_file");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_check_plugin_is_for_file");
+ pl->data[i].func->splt_pl_search_syncerrors =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_search_syncerrors");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_search_syncerrors");
+ pl->data[i].func->splt_pl_import_internal_sheets =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_import_internal_sheets");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_import_internal_sheets");
+ pl->data[i].func->splt_pl_dewrap =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_dewrap");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_dewrap");
+ pl->data[i].func->splt_pl_offset_split =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_offset_split");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_offset_split");
+ pl->data[i].func->splt_pl_split =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_split");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_split");
+ pl->data[i].func->splt_pl_init =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_init");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_init");
+ pl->data[i].func->splt_pl_end =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_end");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_end");
+ pl->data[i].func->splt_pl_scan_silence =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_scan_silence");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_scan_silence");
+ pl->data[i].func->splt_pl_scan_trim_silence =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_scan_trim_silence");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_scan_trim_silence");
+ pl->data[i].func->splt_pl_set_original_tags =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_set_original_tags");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_set_original_tags");
+ pl->data[i].func->splt_pl_clear_original_tags =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_clear_original_tags");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_clear_original_tags");
+ pl->data[i].func->splt_pl_set_plugin_info =
+- lt_dlsym(pl->data[i].plugin_handle, "splt_pl_set_plugin_info");
++ dlsym(pl->data[i].plugin_handle, "splt_pl_set_plugin_info");
+ if (pl->data[i].func->splt_pl_set_plugin_info != NULL)
+ {
+ splt_p_free_plugin_data_info(&pl->data[i]);
+--- a/src/splt.h
++++ b/src/splt.h
+@@ -34,11 +34,6 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+
+-//libtool 1.4e is buggy on mingw if we include ltdl.h
+-#ifndef __WIN32__
+-#include <ltdl.h>
+-#endif
+-
+ #include "mp3splt.h"
+
+ struct _splt_freedb_one_result {
diff --git a/media-libs/libmp3splt/files/libmp3splt-0.9.2-fix-implicit-decl.patch b/media-libs/libmp3splt/files/libmp3splt-0.9.2-fix-implicit-decl.patch
new file mode 100644
index 000000000000..16420e934f57
--- /dev/null
+++ b/media-libs/libmp3splt/files/libmp3splt-0.9.2-fix-implicit-decl.patch
@@ -0,0 +1,304 @@
+--- a/plugins/flac.c
++++ b/plugins/flac.c
+@@ -27,6 +27,7 @@
+ *
+ *********************************************************/
+
++#include <stdlib.h>
+ #include <string.h>
+
+ #include "splt.h"
+--- a/plugins/ogg.c
++++ b/plugins/ogg.c
+@@ -41,6 +41,7 @@
+ The Plug-in that handles ogg vorbis files
+ */
+
++#include <stdlib.h>
+ #include <time.h>
+ #include <string.h>
+ #include <locale.h>
+--- a/plugins/ogg_new_stream_handler.c
++++ b/plugins/ogg_new_stream_handler.c
+@@ -38,6 +38,7 @@
+
+ #include "ogg_new_stream_handler.h"
+
++#include <stdlib.h>
+ #include <string.h>
+
+ splt_ogg_new_stream_handler *splt_ogg_nsh_new(splt_state *state, splt_ogg_state *oggstate,
+--- a/plugins/ogg_silence.c
++++ b/plugins/ogg_silence.c
+@@ -36,6 +36,7 @@
+ *
+ *********************************************************/
+
++#include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+
+--- a/plugins/ogg_utils.c
++++ b/plugins/ogg_utils.c
+@@ -36,6 +36,7 @@
+ *
+ *********************************************************/
+
++#include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+
+--- a/plugins/silence_processors.c
++++ b/plugins/silence_processors.c
+@@ -26,6 +26,8 @@
+
+ #include "silence_processors.h"
+
++#include <stdlib.h>
++
+ static void write_to_full_log(splt_state *state, double time, float level, int shots, int found,
+ double begin_position, double end_position);
+
+--- a/src/cddb.c
++++ b/src/cddb.c
+@@ -28,6 +28,8 @@
+
+ The cddb search functionality
+ */
++
++#include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <math.h>
+--- a/src/client.c
++++ b/src/client.c
+@@ -29,6 +29,7 @@
+ *
+ *********************************************************/
+
++#include <stdlib.h>
+ #include <string.h>
+
+ #include "splt.h"
+--- a/src/cue.c
++++ b/src/cue.c
+@@ -28,6 +28,8 @@
+
+ All that is needed in order to be able to read and write cue files.
+ */
++
++#include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
+
+--- a/src/debug.c
++++ b/src/debug.c
+@@ -29,6 +29,7 @@
+ *
+ *********************************************************/
+
++#include <stdlib.h>
+ #include <string.h>
+ #include <stdarg.h>
+
+--- a/src/errors.c
++++ b/src/errors.c
+@@ -35,6 +35,7 @@
+ that is meant to be used directly are all in mp3splt.c.
+ */
+
++#include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+
+--- a/src/freedb.c
++++ b/src/freedb.c
+@@ -32,6 +32,7 @@
+ that is meant to be used directly are all in mp3splt.c.
+ */
+
++#include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+
+--- a/src/freedb_utils.c
++++ b/src/freedb_utils.c
+@@ -33,6 +33,8 @@
+
+ Utilities used by the functions in freedb.c
+ */
++
++#include <stdlib.h>
+ #include <string.h>
+
+ #include "splt.h"
+--- a/src/input_output.c
++++ b/src/input_output.c
+@@ -28,6 +28,8 @@
+
+ This file contains all I/O functions this library uses.
+ */
++
++#include <stdlib.h>
+ #include <string.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+--- a/src/mp3splt.c
++++ b/src/mp3splt.c
+@@ -42,6 +42,7 @@
+ should therefore not be too hard a task...
+ */
+
++#include <stdlib.h>
+ #include <sys/stat.h>
+ #include <string.h>
+
+--- a/src/oformat_parser.c
++++ b/src/oformat_parser.c
+@@ -33,6 +33,8 @@
+
+ Automatic generation of filenams for split files from tags.
+ */
++
++#include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <math.h>
+--- a/src/options.c
++++ b/src/options.c
+@@ -31,6 +31,8 @@
+
+ #include "splt.h"
+
++#include <stdlib.h>
++
+ extern int global_debug;
+
+ void splt_o_set_options_default_values(splt_state *state)
+--- a/src/output_format.c
++++ b/src/output_format.c
+@@ -33,6 +33,8 @@
+
+ The format of output file names
+ */
++
++#include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+
+--- a/src/pair.c
++++ b/src/pair.c
+@@ -35,6 +35,8 @@
+ */
+ #include "splt.h"
+
++#include <stdlib.h>
++
+ splt_int_pair *splt_int_pair_new(int first, int second)
+ {
+ splt_int_pair *pair = malloc(sizeof(splt_int_pair));
+--- a/src/proxy.c
++++ b/src/proxy.c
+@@ -31,6 +31,7 @@
+
+ #include "splt.h"
+
++#include <stdlib.h>
+ #include <string.h>
+
+ static void splt_pr_free_proxy_address(splt_state *state);
+--- a/src/silence_utils.c
++++ b/src/silence_utils.c
+@@ -35,6 +35,8 @@
+ */
+ #include "splt.h"
+
++#include <stdlib.h>
++
+ int splt_siu_ssplit_new(struct splt_ssplit **silence_list,
+ float begin_position, float end_position, int len, int *error)
+ {
+--- a/src/socket_manager.c
++++ b/src/socket_manager.c
+@@ -33,6 +33,7 @@
+ Manages a socket connection
+ */
+
++#include <stdlib.h>
+ #include <unistd.h>
+
+ #ifdef __WIN32__
+--- a/src/split_points.c
++++ b/src/split_points.c
+@@ -34,6 +34,8 @@
+ All functions needed for handling split points (adding to the list,
+ checking, of this split point already exists,...)
+ */
++
++#include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+
+--- a/src/splt.c
++++ b/src/splt.c
+@@ -34,6 +34,7 @@
+ Actually split the input file
+ */
+
++#include <stdlib.h>
+ #include <sys/stat.h>
+ #include <string.h>
+ #include <math.h>
+--- a/src/sync_errors.c
++++ b/src/sync_errors.c
+@@ -46,6 +46,8 @@
+
+ #include "splt.h"
+
++#include <stdlib.h>
++
+ void splt_se_set_sync_errors_default_values(splt_state *state)
+ {
+ splt_syncerrors *serrors = state->serrors;
+--- a/src/tags_parser.c
++++ b/src/tags_parser.c
+@@ -33,6 +33,8 @@
+
+ Parse tags (Artist, Album, Year,...)
+ */
++
++#include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
+
+--- a/src/tags_utils.c
++++ b/src/tags_utils.c
+@@ -25,6 +25,7 @@
+ * USA.
+ *********************************************************/
+
++#include <stdlib.h>
+ #include <string.h>
+
+ #include "splt.h"
+--- a/src/types_func.c
++++ b/src/types_func.c
+@@ -35,6 +35,7 @@
+ split.
+ */
+
++#include <stdlib.h>
+ #include <string.h>
+
+ #include "splt.h"
+--- a/src/wrap.c
++++ b/src/wrap.c
+@@ -34,6 +34,8 @@
+ Automatically split mp3 files created with mp3wrap into the original
+ tracks
+ */
++
++#include <stdlib.h>
+ #include <string.h>
+
+ #include "splt.h"
diff --git a/media-libs/libmp3splt/libmp3splt-0.9.2-r3.ebuild b/media-libs/libmp3splt/libmp3splt-0.9.2-r3.ebuild
new file mode 100644
index 000000000000..56aa1af3c754
--- /dev/null
+++ b/media-libs/libmp3splt/libmp3splt-0.9.2-r3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Library for mp3splt to split mp3 and ogg files without decoding"
+HOMEPAGE="http://mp3splt.sourceforge.net/mp3splt_page/home.php"
+SRC_URI="mirror://sourceforge/${PN:3}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc flac pcre"
+
+RDEPEND="
+ media-libs/libmad
+ media-libs/libid3tag
+ media-libs/libogg
+ media-libs/libvorbis
+ flac? ( media-libs/flac )
+ pcre? ( dev-libs/libpcre )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-apps/findutils
+ doc? (
+ >=app-doc/doxygen-1.8.3.1
+ media-gfx/graphviz
+ )
+"
+
+DOCS=( AUTHORS ChangeLog LIMITS NEWS README TODO )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.2-drop-libltdl.patch
+ "${FILESDIR}"/${PN}-0.9.2-fix-implicit-decl.patch
+ "${FILESDIR}"/CVE-2017-15185.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-cutter # TODO package cutter <http://cutter.sourceforge.net/>
+ --disable-optimise
+ --disable-static
+ $(use_enable doc doxygen_doc)
+ $(use_enable flac)
+ $(use_enable pcre)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ use doc && docompress -x /usr/share/doc/${PF}/doxygen/${PN}_ico.svg
+
+ find "${ED}" -type f -name '*.la' -delete || die
+}