diff --git a/audio/pacpl/Makefile b/audio/pacpl/Makefile new file mode 100644 index 00000000000..390fa600e89 --- /dev/null +++ b/audio/pacpl/Makefile @@ -0,0 +1,79 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2006/12/12 06:21:34 steven Exp $ + +PKG_ARCH= * + +COMMENT-main= "PAC (Perl Audio Converter)" +COMMENT-konqueror= "PAC Konqueror service menu & mime types" +COMMENT-amarok= "PAC Amarok plugin" + +V= 3.2.5 +DISTNAME= pacpl-${V} +PKGNAME-main= pacpl-${V} +PKGNAME-konqueror= pacpl-konqueror-${V} +PKGNAME-amarok= pacpl-amarok-${V} +CATEGORIES= audio perl5 + +HOMEPAGE= http://pacpl.sourceforge.net/ + +MAINTAINER= Andreas Bihlmaier + +# GPL +PERMIT_PACKAGE_FTP= Yes +PERMIT_PACKAGE_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes + +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pacpl/} + +NO_BUILD= Yes +NO_REGRESS= Yes + +MULTI_PACKAGES= -main -konqueror -amarok + +RUN_DEPENDS= ::audio/bonk \ + ::audio/faac \ + ::audio/lame \ + ::audio/mpg321 \ + ::audio/sox \ + ::audio/vorbis-tools \ + ::audio/p5-Audio-FLAC-Header \ + ::audio/p5-Audio-Musepack \ + ::audio/p5-Audio-WMA \ + ::audio/p5-CDDB_get \ + ::audio/p5-MP3-ID3v1Tag \ + ::audio/p5-MP3-Tag \ + ::audio/p5-MP4-Info \ + ::audio/p5-Ogg-Vorbis-Header \ + ::graphics/ffmpeg \ + ::x11/mplayer + +RUN_DEPENDS-konqueror= ::${BUILD_PKGPATH} \ + ::x11/kde/base3 +RUN_DEPENDS-amarok= ::${BUILD_PKGPATH} \ + ::audio/amarok + +INSTALL_FLAGS= "base kde" +NEW_DIRS= share/mimelnk/audio \ + share/apps/konqueror/servicemenus \ + share/apps/amarok/scripts + +post-extract: + @cd ${WRKSRC}/man && gunzip *.1.gz + +do-configure: + @perl -pi -e '/nice/ || s,/usr/bin,${LOCALBASE}/bin,;' \ + -e 's,mpg123,mpg321,;' -e 's,/dev/cdrom,/dev/rcd0c,;' \ + -e 's,MPCPLAYER\s*=.*$$,MPCPLAYER = ${LOCALBASE}/bin/mplayer,' \ + ${WRKSRC}/pacpl.conf + +do-install: + @perl -pi -e 's,%%LOCALBASE%%,${LOCALBASE},' ${WRKSRC}/pacpl-install +.for d in ${NEW_DIRS} + ${INSTALL_DATA_DIR} ${PREFIX}/$d +.endfor + cd ${WRKSRC} && ./pacpl-install --install=${INSTALL_FLAGS} + ${INSTALL_MAN} ${WRKSRC}/man/pacpl.1 ${PREFIX}/man/man1 + tar -C ${PREFIX}/share/apps/amarok/scripts -xzf \ + ${WRKSRC}/kde/amarok/pacx.amarokscript.tar.gz + +.include diff --git a/audio/pacpl/distinfo b/audio/pacpl/distinfo new file mode 100644 index 00000000000..f9fb7f3e799 --- /dev/null +++ b/audio/pacpl/distinfo @@ -0,0 +1,4 @@ +MD5 (pacpl-3.2.5.tar.gz) = 99a01e373875639c44c2bcc4ef748449 +RMD160 (pacpl-3.2.5.tar.gz) = f486c2baeb6527a40d7f60cd2a6bc91a1c4d1d72 +SHA1 (pacpl-3.2.5.tar.gz) = 23e35dee75f05dfdf9ab7b4d28e9a9030f92f5e0 +SIZE (pacpl-3.2.5.tar.gz) = 118612 diff --git a/audio/pacpl/patches/patch-pacpl b/audio/pacpl/patches/patch-pacpl new file mode 100644 index 00000000000..7dc37d7e121 --- /dev/null +++ b/audio/pacpl/patches/patch-pacpl @@ -0,0 +1,52 @@ +$OpenBSD: patch-pacpl,v 1.1.1.1 2006/12/12 06:21:34 steven Exp $ +--- pacpl.orig Sun Oct 29 17:04:27 2006 ++++ pacpl Sun Dec 10 22:13:32 2006 +@@ -29,7 +29,7 @@ use File::Copy; + use File::Basename; + use Ogg::Vorbis::Header; + +-use Cwd 'abs_path'; ++use Cwd qw(abs_path getcwd); + + # Current Name & Version + my $name = "Perl Audio Converter"; +@@ -224,7 +224,7 @@ my @conf_opts; + # Location of configuration file (Check Global, and then Current Directory) + my $conf_path = "/etc/pacpl"; + my $conf_global = "$conf_path/pacpl.conf"; +-my $conf_pwd = "$ENV{'PWD'}/pacpl.conf"; ++my $conf_pwd = getcwd()."/pacpl.conf"; + + my $conf_file = $conf_global; + $conf_file = $conf_pwd if not -e $conf_global; +@@ -2147,8 +2147,9 @@ if (@file) { + } + + if ($koutdir eq '1' and $gui and not $get_out_directory and not $out_dir) { +- +- $out_dir = `$kdialog --title \"$name - $version - $lang{$mylang}{file_destination}\" --getexistingdirectory $ENV{'PWD'}`; ++ ++ my $cmd = "$kdialog --title \"$name - $version - $lang{$mylang}{file_destination}\" --getexistingdirectory ".getcwd(); ++ $out_dir = `$cmd`; + chomp($out_dir); + + $get_out_directory = 1; +@@ -2241,7 +2242,7 @@ if ($recursive and not $conv_to and not + + } else { + +- my $pwd = $ENV{PWD}; ++ my $pwd = getcwd(); + + foreach my $audio_dir (@dir) { + +@@ -2273,7 +2274,8 @@ if ($recursive and not $conv_to and not + + if ($gui and not $get_out_directory and $koutdir eq 1 and not $out_dir) { + +- $out_dir = `$kdialog --title \"PAC $version - $lang{$mylang}{file_destination}\" --getexistingdirectory $ENV{'PWD'}`; ++ my $cmd = "$kdialog --title \"PAC $version - $lang{$mylang}{file_destination}\" --getexistingdirectory ".getcwd(); ++ $out_dir = `$cmd`; + chomp($out_dir); + + $get_out_directory = 1; diff --git a/audio/pacpl/patches/patch-pacpl-install b/audio/pacpl/patches/patch-pacpl-install new file mode 100644 index 00000000000..f9faa4f745d --- /dev/null +++ b/audio/pacpl/patches/patch-pacpl-install @@ -0,0 +1,65 @@ +--- pacpl-install.orig Sun Sep 17 17:47:14 2006 ++++ pacpl-install Mon Dec 11 16:13:40 2006 +@@ -38,15 +38,12 @@ my $uninstall_msg = "$name - $version: + my ($install, $uninstall, $checkinstall, $help); + my ($all, $base, $kde, $tags, $lang); + +-my $prefix = "/usr/local"; +-my $kde_prefix; ++my $prefix = $ENV{'PREFIX'}; ++my $kde_prefix = $prefix; + +- $kde_prefix = "$ENV{'KDEDIR'}" if $ENV{'KDEDIR'}; +- $kde_prefix = "/usr" if not $ENV{'KDEDIR'}; ++my $conf_path = "$prefix/share/examples/pacpl"; ++my $doc_path = "$prefix/share/doc/pacpl"; + +-my $conf_path = "/etc/pacpl"; +-my $doc_path = "$prefix/doc/pacpl-$version"; +- + GetOptions('i|install=s' => \$install, + 'u|uninstall=s' => \$uninstall, + 'c|checkinstall' => \$checkinstall, +@@ -68,9 +65,8 @@ my @MIMES = qw(x-shn.desktop x-ape + x-lpac.desktop x-kxs.desktop x-la.desktop + x-bonk.desktop); + +-my @BASE = qw(pacpl pacpl.conf pacpl-install pacpl.1.gz +- README ChangeLog GPL +- INSTALL TODO FAQ); ++my @BASE = qw(pacpl pacpl.conf pacpl.1 ++ README FAQ); + + my @MODULES = qw(Parse::RecDescent Carp Inline + Inline::C Audio::Musepack Audio::WMA +@@ -94,7 +90,6 @@ if (!grep(/base|all|tags|kde|lang/, $ins + # Install base program + if ($install =~ /base|all/i) { + +- if (!-e "$prefix/doc") { mkdir("$prefix/doc") } + + mkdir("$doc_path"); + +@@ -383,6 +378,8 @@ sub checkinstall { + print "-------------------------------------------------\n"; + + foreach my $app (sort(keys(%program))) { ++ $program{$app} = "%%LOCALBASE%%/bin/$app"; ++ next; + + if (`which $app 2>/dev/null`) { + +@@ -443,12 +440,12 @@ sub checkinstall { + print "\nSee $doc_path/README for application URLs\n"; + print "\nPress enter to continue"; + +- my $enter = ; + + my @TAG_MODS = qw(MP3::Tag Ogg::Vorbis::Header Audio::FLAC::Header + MP4::Info Audio::Musepack Audio::WMA + + CDDB_get); ++ @TAG_MODS = (); + + print "\n$name - $version: Audio Tagging Modules\n\n"; + diff --git a/audio/pacpl/pkg/DESCR-amarok b/audio/pacpl/pkg/DESCR-amarok new file mode 100644 index 00000000000..8c4f08ee5bb --- /dev/null +++ b/audio/pacpl/pkg/DESCR-amarok @@ -0,0 +1 @@ +PAC amarok plugin to convert between audio formats within amarok. diff --git a/audio/pacpl/pkg/DESCR-konqueror b/audio/pacpl/pkg/DESCR-konqueror new file mode 100644 index 00000000000..cf56c0529ba --- /dev/null +++ b/audio/pacpl/pkg/DESCR-konqueror @@ -0,0 +1 @@ +PAC extensions for konqueror. diff --git a/audio/pacpl/pkg/DESCR-main b/audio/pacpl/pkg/DESCR-main new file mode 100644 index 00000000000..70643b38dcf --- /dev/null +++ b/audio/pacpl/pkg/DESCR-main @@ -0,0 +1,13 @@ +Perl Audio Converter is a tool for converting multiple audio types from +one format to another. It supports MP2, MP3, Ogg Vorbis, FLAC, Shorten, +Monkey Audio, FAAC (AAC/M4A/MP4), Musepack (MPC), Wavpack (WV), +OptimFrog (OFR/OFS), TTA, LPAC, Kexis (KXS), AIFF, AC3, Lossless Audio (LA), +BONK, AU, SND, RAW, VOC, SMP, RealAudio (RA/RAM), WAV, and WMA. + +It can also convert audio from the following video formats/extensions: +RM, RV, ASF, DivX, MPG, MKV, MPEG, AVI, MOV, OGM, QT, VCD, VOB, FLV, and WMV. + +A CD ripping function with CDDB support, batch and playlist conversion, +daemon mode for converting files on the fly, tag preservation for most +supported formats, independent tag reading/writing, and extensions for +konqueror and amarok are also provided. diff --git a/audio/pacpl/pkg/MESSAGE-amarok b/audio/pacpl/pkg/MESSAGE-amarok new file mode 100644 index 00000000000..b3537e22e19 --- /dev/null +++ b/audio/pacpl/pkg/MESSAGE-amarok @@ -0,0 +1,2 @@ +To enable the PAC plugin: +Tools -> Script Manager: General -> pacx.pl -> Run diff --git a/audio/pacpl/pkg/PLIST-amarok b/audio/pacpl/pkg/PLIST-amarok new file mode 100644 index 00000000000..e3acd76c4eb --- /dev/null +++ b/audio/pacpl/pkg/PLIST-amarok @@ -0,0 +1,4 @@ +@comment $OpenBSD: PLIST-amarok,v 1.1.1.1 2006/12/12 06:21:34 steven Exp $ +share/apps/amarok/scripts/pacx.amarokscript/ +share/apps/amarok/scripts/pacx.amarokscript/README +share/apps/amarok/scripts/pacx.amarokscript/pacx.pl diff --git a/audio/pacpl/pkg/PLIST-konqueror b/audio/pacpl/pkg/PLIST-konqueror new file mode 100644 index 00000000000..fd94ee87e4c --- /dev/null +++ b/audio/pacpl/pkg/PLIST-konqueror @@ -0,0 +1,13 @@ +@comment $OpenBSD: PLIST-konqueror,v 1.1.1.1 2006/12/12 06:21:34 steven Exp $ +share/apps/konqueror/servicemenus/pacpl.desktop +share/mimelnk/audio/ +share/mimelnk/audio/x-ape.desktop +share/mimelnk/audio/x-bonk.desktop +share/mimelnk/audio/x-kxs.desktop +share/mimelnk/audio/x-la.desktop +share/mimelnk/audio/x-lpac.desktop +share/mimelnk/audio/x-ofr.desktop +share/mimelnk/audio/x-ofs.desktop +share/mimelnk/audio/x-shn.desktop +share/mimelnk/audio/x-tta.desktop +share/mimelnk/audio/x-wavpack.desktop diff --git a/audio/pacpl/pkg/PLIST-main b/audio/pacpl/pkg/PLIST-main new file mode 100644 index 00000000000..e5fe469ec7c --- /dev/null +++ b/audio/pacpl/pkg/PLIST-main @@ -0,0 +1,10 @@ +@comment $OpenBSD: PLIST-main,v 1.1.1.1 2006/12/12 06:21:34 steven Exp $ +bin/pacpl +@man man/man1/pacpl.1 +share/doc/pacpl/ +share/doc/pacpl/FAQ +share/doc/pacpl/README +share/examples/pacpl/ +@sample ${SYSCONFDIR}/pacpl/ +share/examples/pacpl/pacpl.conf +@sample ${SYSCONFDIR}/pacpl/pacpl.conf