<commit_before>DESCRIPTION = "The X MultiMedia System"
HOMEPAGE = "http://www.xmms.org/"
LICENSE = "GPL"
SECTION = "x11/multimedia"
# TODO add esd
DEPENDS = "gtk+-1.2 libvorbis mikmod alsa-lib libsm esound"

SRC_URI = "http://www.xmms.org/files/1.2.x/xmms-${PV}.tar.bz2 \
           file://gcc4.patch \
           file://xmms-config-dequote.patch \
	   file://acinclude.m4 \
           file://xmms.sh"
PR = "r6"

RRECOMMENDS_${PN} = "xmms-plugin-output-oss xmms-plugin-output-alsa \
                    xmms-mad xmms-tremor"

inherit autotools binconfig

# TODO enable esd
EXTRA_OECONF = "--disable-opengl --disable-esd \
                --with-vorbis-includes=${STAGING_INCDIR} \
                --with-ogg-includes=${STAGING_INCDIR} \
                --with-vorbis-libraries=${STAGING_LIBDIR} \
                --with-ogg-libraries=${STAGING_LIBDIR}"

do_configure_prepend() {
	cp ${WORKDIR}/acinclude.m4 ${S}
	rm -f ${S}/libxmms/acinclude.m4 || true
	for i in $(find . -name "Makefile*") ; do
		sed -i -e 's:MKINSTALLDIRS = @MKINSTALLDIRS@:MKINSTALLDIRS = @mkdir_p@:g' \ 
	           -e 's:$(SHELL) $(MKINSTALLDIRS):$(MKINSTALLDIRS):g' $i
	done
}

do_install_append() {
	install -m 0755 ${WORKDIR}/xmms.sh ${D}${bindir}
	install -d ${D}${datadir}/applications

	install xmms/xmms.desktop                             ${D}${datadir}/applications
	sed -i "s/Exec=xmms/Exec=xmms.sh/"                    ${D}${datadir}/applications/xmms.desktop
	sed -i "s/comment/Comment/"                           ${D}${datadir}/applications/xmms.desktop
	sed -i "s/Encoding=Legacy-Mixed/StartupNotify=true/"  ${D}${datadir}/applications/xmms.desktop
	sed -i "s/Terminal=0/Terminal=false/"                 ${D}${datadir}/applications/xmms.desktop
	sed -i "s/Type=Application/Type=Application\nCategories=AudioVideo;/" ${D}${datadir}/applications/xmms.desktop

	install -d ${D}${datadir}/pixmaps
	install xmms/xmms_mini.xpm ${D}${datadir}/pixmaps
}

PACKAGES_DYNAMIC = "xmms-plugin-effect-* xmms-plugin-general-* \
                    xmms-plugin-input-* xmms-plugin-output-* \
		    xmms-plugin-visualisation-*"
<commit_msg>xmms: bandaid some more host path leakage<commit_after>DESCRIPTION = "The X MultiMedia System"
HOMEPAGE = "http://www.xmms.org/"
LICENSE = "GPL"
SECTION = "x11/multimedia"
# TODO add esd
DEPENDS = "gtk+-1.2 libvorbis mikmod alsa-lib libsm esound"

SRC_URI = "http://www.xmms.org/files/1.2.x/xmms-${PV}.tar.bz2 \
           file://gcc4.patch \
           file://xmms-config-dequote.patch \
	   file://acinclude.m4 \
           file://xmms.sh"
PR = "r7"

RRECOMMENDS_${PN} = "xmms-plugin-output-oss xmms-plugin-output-alsa \
                    xmms-mad xmms-tremor"

inherit autotools binconfig

# TODO enable esd
EXTRA_OECONF = "--disable-opengl --disable-esd \
                --with-vorbis-includes=${STAGING_INCDIR} \
                --with-ogg-includes=${STAGING_INCDIR} \
                --with-vorbis-libraries=${STAGING_LIBDIR} \
                --with-ogg-libraries=${STAGING_LIBDIR}"

do_configure_prepend() {
	cp ${WORKDIR}/acinclude.m4 ${S}
	rm -f ${S}/libxmms/acinclude.m4 || true
	for i in $(find . -name "Makefile*") ; do
		sed -i -e 's:MKINSTALLDIRS = @MKINSTALLDIRS@:MKINSTALLDIRS = @mkdir_p@:g' \ 
	           -e 's:$(SHELL) $(MKINSTALLDIRS):$(MKINSTALLDIRS):g' $i
	done
}

do_configure_append() {
	for i in $(find . -name "Makefile"); do
		sed -i -e 's:L/usr/lib:L${STAGING_LIBDIR}:g' \
		       $i
	done
}

do_install_append() {
	install -m 0755 ${WORKDIR}/xmms.sh ${D}${bindir}
	install -d ${D}${datadir}/applications

	install xmms/xmms.desktop                             ${D}${datadir}/applications
	sed -i "s/Exec=xmms/Exec=xmms.sh/"                    ${D}${datadir}/applications/xmms.desktop
	sed -i "s/comment/Comment/"                           ${D}${datadir}/applications/xmms.desktop
	sed -i "s/Encoding=Legacy-Mixed/StartupNotify=true/"  ${D}${datadir}/applications/xmms.desktop
	sed -i "s/Terminal=0/Terminal=false/"                 ${D}${datadir}/applications/xmms.desktop
	sed -i "s/Type=Application/Type=Application\nCategories=AudioVideo;/" ${D}${datadir}/applications/xmms.desktop

	install -d ${D}${datadir}/pixmaps
	install xmms/xmms_mini.xpm ${D}${datadir}/pixmaps
}

PACKAGES_DYNAMIC = "xmms-plugin-effect-* xmms-plugin-general-* \
                    xmms-plugin-input-* xmms-plugin-output-* \
		    xmms-plugin-visualisation-*"

{'fraction_non_alphanumeric': 0.16967344142498286, 'fraction_numerical': 0.007764329755651975, 'mean_word_length': 2.637873754152824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2105118', 'n_tokens_mistral': 1796, 'n_tokens_neox': 1703, 'n_words': 254}