From ee6d2b57852a098af99597a9b2b6ce7c149aa25c Mon Sep 17 00:00:00 2001 From: Nathan Fisher Date: Mon, 12 Sep 2022 18:39:17 -0400 Subject: [PATCH] Add `audio/alsa-tools` --- audio/alsa-lib/Makefile | 2 +- audio/alsa-tools/DESCR | 1 + audio/alsa-tools/Makefile | 20 ++ audio/alsa-tools/gitcompile-posix-opts.patch | 300 +++++++++++++++++++ mk/targets.mk | 10 +- 5 files changed, 327 insertions(+), 6 deletions(-) create mode 100644 audio/alsa-tools/DESCR create mode 100644 audio/alsa-tools/Makefile create mode 100644 audio/alsa-tools/gitcompile-posix-opts.patch diff --git a/audio/alsa-lib/Makefile b/audio/alsa-lib/Makefile index 3634ce1..3ad4eb5 100644 --- a/audio/alsa-lib/Makefile +++ b/audio/alsa-lib/Makefile @@ -1,4 +1,4 @@ -# Makefile - hhl - /usr/ports/lang/gcc12 +# Makefile - hhl - /usr/ports/audio/alsa-lib # Copyright 2022 Nathan Fisher # comment = The ALSA library used for the ALSA sound interface diff --git a/audio/alsa-tools/DESCR b/audio/alsa-tools/DESCR new file mode 100644 index 0000000..6eb5ad3 --- /dev/null +++ b/audio/alsa-tools/DESCR @@ -0,0 +1 @@ +The ALSA Tools package contains advanced tools for certain sound cards. diff --git a/audio/alsa-tools/Makefile b/audio/alsa-tools/Makefile new file mode 100644 index 0000000..f700a8f --- /dev/null +++ b/audio/alsa-tools/Makefile @@ -0,0 +1,20 @@ +# Makefile - hhl - /usr/ports/audio/alsa-lib +# Copyright 2022 Nathan Fisher +# +comment = The ALSA Tools package contains advanced tools for certain sound cards. +distname = alsa-tools +pkg_version = 1.2.5 +pkg_homepage = https://www.alsa-project.org/ +pkg_license = gnu-gpl-v2 +pkg_maintainer = jeang3nie@hitchhiker-linux.org +distext = bz2 +dist_remote = $(pkg_homepage)/files/pub/tools/$(distfile) +sha512_sum = 1c4ff947d9f2424056a6748e04a1250fb73443a3f470f61d0b563c91be082bc42d56e550d6cc27eaed3edcea2066a107e20455c959b053b5deafa2d811b7e498 +use_configure = 0 +no_objdir = 1 +patches = gitcompile-posix-opts.patch + +dependencies += audio/alsa-lib +include ../../mk/ports.mk +include ../../mk/targets.mk + diff --git a/audio/alsa-tools/gitcompile-posix-opts.patch b/audio/alsa-tools/gitcompile-posix-opts.patch new file mode 100644 index 0000000..ecccde7 --- /dev/null +++ b/audio/alsa-tools/gitcompile-posix-opts.patch @@ -0,0 +1,300 @@ +diff -Naur alsa-tools-1.2.5.orig/Makefile alsa-tools-1.2.5/Makefile +--- alsa-tools-1.2.5.orig/Makefile Thu May 27 16:09:02 2021 ++++ alsa-tools-1.2.5/Makefile Mon Sep 12 18:34:28 2022 +@@ -2,7 +2,7 @@ + TOP = . + SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \ + mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \ +- us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \ ++ us428control usx2yloader vxloader echomixer ld10k1 \ + hwmixvolume hdajackretask hda-verb hdajacksensetest + + all: +diff -Naur alsa-tools-1.2.5.orig/as10k1/gitcompile alsa-tools-1.2.5/as10k1/gitcompile +--- alsa-tools-1.2.5.orig/as10k1/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/as10k1/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR" ; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/echomixer/gitcompile alsa-tools-1.2.5/echomixer/gitcompile +--- alsa-tools-1.2.5.orig/echomixer/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/echomixer/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR"; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/envy24control/gitcompile alsa-tools-1.2.5/envy24control/gitcompile +--- alsa-tools-1.2.5.orig/envy24control/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/envy24control/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR"; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/hda-verb/gitcompile alsa-tools-1.2.5/hda-verb/gitcompile +--- alsa-tools-1.2.5.orig/hda-verb/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/hda-verb/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + aclocal $ACLOCAL_FLAGS || exit 1 + automake --foreign --add-missing || exit 1 +diff -Naur alsa-tools-1.2.5.orig/hdajackretask/gitcompile alsa-tools-1.2.5/hdajackretask/gitcompile +--- alsa-tools-1.2.5.orig/hdajackretask/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/hdajackretask/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR"; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/hdajacksensetest/gitcompile alsa-tools-1.2.5/hdajacksensetest/gitcompile +--- alsa-tools-1.2.5.orig/hdajacksensetest/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/hdajacksensetest/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + aclocal $ACLOCAL_FLAGS || exit 1 + automake --foreign --add-missing || exit 1 +diff -Naur alsa-tools-1.2.5.orig/hdspconf/gitcompile alsa-tools-1.2.5/hdspconf/gitcompile +--- alsa-tools-1.2.5.orig/hdspconf/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/hdspconf/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR"; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/hdsploader/gitcompile alsa-tools-1.2.5/hdsploader/gitcompile +--- alsa-tools-1.2.5.orig/hdsploader/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/hdsploader/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + aclocal $ACLOCAL_FLAGS || exit 1 + automake --foreign --add-missing || exit 1 +diff -Naur alsa-tools-1.2.5.orig/hdspmixer/gitcompile alsa-tools-1.2.5/hdspmixer/gitcompile +--- alsa-tools-1.2.5.orig/hdspmixer/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/hdspmixer/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR"; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/hwmixvolume/gitcompile alsa-tools-1.2.5/hwmixvolume/gitcompile +--- alsa-tools-1.2.5.orig/hwmixvolume/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/hwmixvolume/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR" ; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/ld10k1/gitcompile alsa-tools-1.2.5/ld10k1/gitcompile +--- alsa-tools-1.2.5.orig/ld10k1/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/ld10k1/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + autoreconf -fi || exit 1 + export CFLAGS='-O2 -Wall -pipe -g' +diff -Naur alsa-tools-1.2.5.orig/mixartloader/gitcompile alsa-tools-1.2.5/mixartloader/gitcompile +--- alsa-tools-1.2.5.orig/mixartloader/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/mixartloader/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + aclocal $ACLOCAL_FLAGS || exit 1 + automake --foreign --add-missing || exit 1 +diff -Naur alsa-tools-1.2.5.orig/pcxhrloader/gitcompile alsa-tools-1.2.5/pcxhrloader/gitcompile +--- alsa-tools-1.2.5.orig/pcxhrloader/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/pcxhrloader/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + aclocal $ACLOCAL_FLAGS || exit 1 + automake --foreign --add-missing || exit 1 +diff -Naur alsa-tools-1.2.5.orig/qlo10k1/gitcompile alsa-tools-1.2.5/qlo10k1/gitcompile +--- alsa-tools-1.2.5.orig/qlo10k1/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/qlo10k1/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + autoreconf -fi || exit 1 + export CFLAGS='-O2 -Wall -pipe -g' +diff -Naur alsa-tools-1.2.5.orig/rmedigicontrol/gitcompile alsa-tools-1.2.5/rmedigicontrol/gitcompile +--- alsa-tools-1.2.5.orig/rmedigicontrol/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/rmedigicontrol/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR"; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/sb16_csp/gitcompile alsa-tools-1.2.5/sb16_csp/gitcompile +--- alsa-tools-1.2.5.orig/sb16_csp/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/sb16_csp/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR"; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/seq/sbiload/gitcompile alsa-tools-1.2.5/seq/sbiload/gitcompile +--- alsa-tools-1.2.5.orig/seq/sbiload/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/seq/sbiload/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR"; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/sscape_ctl/gitcompile alsa-tools-1.2.5/sscape_ctl/gitcompile +--- alsa-tools-1.2.5.orig/sscape_ctl/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/sscape_ctl/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + if test -z "$AUTOMAKE_DIR"; then + if test -d /usr/local/share/automake; then +@@ -13,7 +13,7 @@ + fi + + for f in install-sh mkinstalldirs missing; do +- cp -av $AUTOMAKE_DIR/$f . || exit 1 ++ cp $AUTOMAKE_DIR/$f . || exit 1 + done + + aclocal $ACLOCAL_FLAGS || exit 1 +diff -Naur alsa-tools-1.2.5.orig/us428control/gitcompile alsa-tools-1.2.5/us428control/gitcompile +--- alsa-tools-1.2.5.orig/us428control/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/us428control/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + aclocal $ACLOCAL_FLAGS || exit 1 + automake --foreign --add-missing || exit 1 +diff -Naur alsa-tools-1.2.5.orig/usx2yloader/gitcompile alsa-tools-1.2.5/usx2yloader/gitcompile +--- alsa-tools-1.2.5.orig/usx2yloader/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/usx2yloader/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + aclocal $ACLOCAL_FLAGS || exit 1 + automake --foreign --add-missing || exit 1 +diff -Naur alsa-tools-1.2.5.orig/vxloader/gitcompile alsa-tools-1.2.5/vxloader/gitcompile +--- alsa-tools-1.2.5.orig/vxloader/gitcompile Thu May 27 13:18:38 2021 ++++ alsa-tools-1.2.5/vxloader/gitcompile Mon Sep 12 18:30:44 2022 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + aclocal $ACLOCAL_FLAGS || exit 1 + automake --foreign --add-missing || exit 1 diff --git a/mk/targets.mk b/mk/targets.mk index 5f4c5c6..c4396d7 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -130,10 +130,10 @@ $(config_tgt): $(config_deps) | $(pre_dirs) $(srcdir)/.patched: $(patches) $(srcdir)/.dirstamp $(info $(grn)=== Patching $(srcdir) ===$(reset)) for patch in $(patches) ; do cd $(srcdir) && \ - patch -p1 < $(wkgdir)/$${patch} ; done + patch -p1 < $(portdir)/$${patch} ; done touch $@ -$(srcdir)/.dirstamp: $(distlocal) install_dependencies | $(workdir) +$(srcdir)/.dirstamp: $(distlocal) $(workdir)/.dependencies_installed | $(workdir) $(info $(grn)=== Extracting $(distlocal) ===$(reset)) [ "$$(sha512sum $(distlocal) | awk '{ print $$1 }')" == "$(sha512_sum)" ] tar $(tarflags) $(distlocal) -C work/ @@ -145,9 +145,9 @@ install_dependencies: $(workdir)/.dependencies_installed $(workdir)/.dependencies_installed: | $(workdir) for dep in $(dependencies) ; \ - do depname = $$(basename $${dep}) ; \ - if [ ! $$(pkg_info -qe $${depname}) ] ; \ - then make -C /usr/ports/$${dep} ; \ + do depname=$$(basename $${dep}) ; \ + if [ $$(pkg_info -qe $${depname}) ] ; \ + then make -C /usr/ports/$${dep} install; \ fi ; done touch $@