Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

1
misc/mkcue/DESCR Normal file
View File

@@ -0,0 +1 @@
Generates a CUE sheet from a CD

26
misc/mkcue/Makefile Normal file
View File

@@ -0,0 +1,26 @@
# $NetBSD: Makefile,v 1.3 2012/10/08 09:57:30 asau Exp $
#
DISTNAME= mkcue_1.orig
PKGNAME= mkcue-2.1
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_DEBIAN:=pool/main/m/mkcue/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://packages.debian.org/source/stable/mkcue
COMMENT= Generates a CUE sheet from a CD
LICENSE= gnu-lgpl-v2
WRKSRC= ${WRKDIR}/mkcue-1.orig
GNU_CONFIGURE= yes
USE_LANGUAGES= c c++
USE_TOOLS+= gmake
MAKE_FILE= GNUmakefile
INSTALLATION_DIRS= bin
post-extract:
${CP} ${FILESDIR}/mb_dragonfly.cpp ${WRKSRC}/osdep
${CP} ${FILESDIR}/mb_dragonfly.h ${WRKSRC}/osdep
.include "../../mk/bsd.pkg.mk"

2
misc/mkcue/PLIST Normal file
View File

@@ -0,0 +1,2 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2009/07/27 19:35:00 drochner Exp $
bin/mkcue

7
misc/mkcue/distinfo Normal file
View File

@@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.2 2011/01/08 12:43:10 drochner Exp $
SHA1 (mkcue_1.orig.tar.gz) = d9a69718ba3d862b589588bdf61796f755200f9d
RMD160 (mkcue_1.orig.tar.gz) = 8462f803235d90fef3d4dd27a83a47ae895cd4b2
Size (mkcue_1.orig.tar.gz) = 80650 bytes
SHA1 (patch-aa) = 54e894382ab940d522290b6d65503146149fd7e0
SHA1 (patch-ab) = ac8ba060fff82d1597e189c0dde4db33f0cff871

View File

@@ -0,0 +1,160 @@
/* --------------------------------------------------------------------------
MusicBrainz -- The Internet music metadatabase
Copyright (C) 2000 Robert Kaye
Copyright (C) 1999 Marc E E van Woerkom
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
----------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <assert.h>
#include <netinet/in.h>
#include "mb.h"
#include "diskid.h"
#include "config.h"
MUSICBRAINZ_DEVICE DEFAULT_DEVICE = "/dev/cd0";
int ReadTOCHeader(int fd,
int& first,
int& last)
{
struct ioc_toc_header th;
int ret = ioctl(fd,
CDIOREADTOCHEADER,
&th);
if (!ret)
{
first = th.starting_track;
last = th.ending_track;
}
return ret;
}
int ReadTOCEntry(int fd,
int track,
int& lba)
{
struct ioc_read_toc_entry te;
te.starting_track = (u_char) track;
te.address_format = CD_LBA_FORMAT; // experiment and cdio.h say
// lbas are given in network order!
struct cd_toc_entry cte;
te.data = &cte;
te.data_len = sizeof(cd_toc_entry);
int ret = ioctl(fd,
CDIOREADTOCENTRYS,
&te);
if (!ret) {
assert(te.address_format == CD_LBA_FORMAT);
lba = ntohl(te.data->addr.lba); // network to host order (long)
}
return ret;
}
bool DiskId::ReadTOC(MUSICBRAINZ_DEVICE device,
MUSICBRAINZ_CDINFO& cdinfo)
{
int fd;
int first;
int last;
int lba;
int i;
if (device == NULL)
{
device = DEFAULT_DEVICE;
}
fd = open(device, O_RDONLY);
if (fd < 0)
{
char err[256];
sprintf(err, "Cannot open '%s'", device);
ReportError(err);
return false;
}
// Initialize cdinfo to all zeroes.
memset(&cdinfo, 0, sizeof(MUSICBRAINZ_CDINFO));
// Find the number of the first track (usually 1) and the last track.
if (ReadTOCHeader(fd, first, last))
{
ReportError("Cannot read table of contents.");
close(fd);
return false;
}
// Do some basic error checking.
if (last==0)
{
ReportError("This disk has no tracks.");
close(fd);
return false;
}
// Now, for every track, find out the block address where it starts.
for (i = first; i <= last; i++)
{
ReadTOCEntry(fd, i, lba);
cdinfo.FrameOffset[i] = lba + 150;
}
// Get the logical block address (lba) for the end of the audio data.
// The "LEADOUT" track is the track beyond the final audio track
// so we're looking for the block address of the LEADOUT track.
int CDROM_LEADOUT = last + 1;
ReadTOCEntry(fd, CDROM_LEADOUT, lba);
cdinfo.FrameOffset[0] = lba + 150;
cdinfo.FirstTrack = first;
cdinfo.LastTrack = last;
close(fd);
return true;
}

View File

@@ -0,0 +1,56 @@
/* --------------------------------------------------------------------------
MusicBrainz -- The Internet music metadatabase
Copyright (C) 2000 Robert Kaye
Copyright (C) 1999 Marc E E van Woerkom
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
----------------------------------------------------------------------------*/
#if !defined(_CDI_DRAGONFLY_H_)
#define _CDI_DRAGONFLY_H_
#define OS "DragonFly"
//
// DragonFly CD audio declarations
//
#include <sys/cdio.h>
typedef char* MUSICBRAINZ_DEVICE;
//
// DragonFly specific prototypes
//
int ReadTOCHeader(int fd,
int& first,
int& last);
int ReadTOCEntry(int fd,
int track,
int& lba);
#endif

View File

@@ -0,0 +1,43 @@
$NetBSD: patch-aa,v 1.1.1.1 2009/07/27 19:35:00 drochner Exp $
--- mkcue.cc.orig 2004-10-27 08:20:30.000000000 +0200
+++ mkcue.cc
@@ -12,6 +12,9 @@ static char ident[] =
#include "diskid.h"
+/* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439790 */
+#define MSF_OFFSET 150
+
void
DiskId::ReportError(char *err)
{
@@ -54,16 +57,12 @@ main(int argc, char *argv[])
}
puts("FILE \"dummy.wav\" WAVE");
- puts(" TRACK 01 AUDIO");
- puts(" INDEX 01 00:00:00");
#define min(x, y) ((x) < (y) ? (x) : (y))
- for (track = cdinfo.FirstTrack + 1;
+ for (track = cdinfo.FirstTrack;
track <= min(trackcount, cdinfo.LastTrack);
track++) {
- /* There is frequently (always?) an offset of 150 sectors, so
- * subtract the first track's offset. */
- cdinfo.FrameOffset[track] -= cdinfo.FrameOffset[1];
+ cdinfo.FrameOffset[track] -= MSF_OFFSET;
minutes = seconds = sectors = 0;
sectors = cdinfo.FrameOffset[track] % 75;
@@ -76,6 +75,9 @@ main(int argc, char *argv[])
}
printf(" TRACK %02d AUDIO\n", track);
+ if (track == 1 && cdinfo.FrameOffset[track] > 0) {
+ printf(" INDEX 00 00:00:00\n");
+ }
printf(" INDEX 01 %02d:%02d:%02d\n", minutes, seconds, sectors);
}

View File

@@ -0,0 +1,12 @@
$NetBSD: patch-ab,v 1.1 2011/01/08 12:43:10 drochner Exp $
--- configure.orig 2011-01-08 20:02:27 +1300
+++ configure 2011-01-08 19:58:18 +1300
@@ -1387,6 +1387,7 @@
*-os2_emx*) os=os2 ;;
*-solaris*) os=solaris; LIBS='-lsocket -lnsl' ;;
*-qnx*) os=qnx; LIBS='-lsocket' ;;
+ *-dragonfly*) os=dragonfly;;
*) echo "$as_me:$LINENO: result: WARNING: unknown system" >&5
echo "${ECHO_T}WARNING: unknown system" >&6 ;;
esac