aboutsummaryrefslogtreecommitdiff
path: root/print/kcdlabel
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2003-12-29 09:54:25 +0000
committerMark Linimon <linimon@FreeBSD.org>2003-12-29 09:54:25 +0000
commitb1ba755331d12fd3393d916075502601af5b0118 (patch)
treeb0c9085161978c966d9e85517d6e2b818ecd5f81 /print/kcdlabel
parent8da7f1b71a9466cae0d62487216f585b80bcec00 (diff)
downloadports-b1ba755331d12fd3393d916075502601af5b0118.tar.gz
ports-b1ba755331d12fd3393d916075502601af5b0118.zip
Add two new KDE apps to deal with CDs:
kcdlabel creates covers, labels and booklets for your CD cases; kover is a WYSIWYG CD cover printer. PR: ports/60674, ports/60673 Submitted by: Markus Brueffer <brueffer@phoenix-systems.de>
Notes
Notes: svn path=/head/; revision=96870
Diffstat (limited to 'print/kcdlabel')
-rw-r--r--print/kcdlabel/Makefile27
-rw-r--r--print/kcdlabel/distinfo1
-rw-r--r--print/kcdlabel/files/patch-audiocd.cpp97
-rw-r--r--print/kcdlabel/files/patch-audiocd.h27
-rw-r--r--print/kcdlabel/files/patch-kdirtree.cpp12
-rw-r--r--print/kcdlabel/pkg-descr5
-rw-r--r--print/kcdlabel/pkg-plist40
7 files changed, 209 insertions, 0 deletions
diff --git a/print/kcdlabel/Makefile b/print/kcdlabel/Makefile
new file mode 100644
index 000000000000..baa92880219f
--- /dev/null
+++ b/print/kcdlabel/Makefile
@@ -0,0 +1,27 @@
+# New ports collection makefile for: kcdlabel
+# Date created: Mon Dec 29 03:01:39 CET 2003
+# Whom: Markus Brueffer <brueffer@phoenix-systems.de>
+#
+# $FreeBSD$
+
+PORTNAME= kcdlabel
+PORTVERSION= 2.12
+CATEGORIES= print kde
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+DISTNAME= ${PORTNAME}-${PORTVERSION}-KDE3
+
+MAINTAINER= brueffer@phoenix-systems.de
+COMMENT= Create covers, labels and booklets for your CD cases
+
+USE_KDELIBS_VER= 3
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+USE_REINPLACE= yes
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|-O2||g' ${WRKSRC}/${CONFIGURE_SCRIPT}
+
+.include <bsd.port.pre.mk>
+.include "${PORTSDIR}/x11/kde3/Makefile.kde"
+.include <bsd.port.post.mk>
diff --git a/print/kcdlabel/distinfo b/print/kcdlabel/distinfo
new file mode 100644
index 000000000000..3f6e20336949
--- /dev/null
+++ b/print/kcdlabel/distinfo
@@ -0,0 +1 @@
+MD5 (kcdlabel-2.12-KDE3.tar.gz) = b1a3f875fa3c6005db1fc7da47b13020
diff --git a/print/kcdlabel/files/patch-audiocd.cpp b/print/kcdlabel/files/patch-audiocd.cpp
new file mode 100644
index 000000000000..3ee6abd6ae86
--- /dev/null
+++ b/print/kcdlabel/files/patch-audiocd.cpp
@@ -0,0 +1,97 @@
+--- kcdlabel/audiocd.cpp.orig Mon Dec 29 01:15:28 2003
++++ kcdlabel/audiocd.cpp Mon Dec 29 02:15:09 2003
+@@ -58,8 +58,13 @@
+
+ bool AudioCD::readTOC()
+ {
++#ifdef __FreeBSD__
++ struct ioc_toc_header tochdr;
++ struct ioc_read_toc_single_entry tocentry;
++#else
+ struct cdrom_tochdr tochdr;
+ struct cdrom_tocentry tocentry;
++#endif
+ int i;
+
+ emit statusText((char *)"Reading Toc...");
+@@ -73,36 +78,61 @@
+ return(false);
+ }
+
++#ifdef __FreeBSD__
++ if (ioctl(cdromfd, CDIOREADTOCHEADER, &tochdr) == -1)
++#else
+ if (ioctl(cdromfd,CDROMREADTOCHDR,&tochdr) == -1)
++#endif
+ {
+ emit statusText((char *)"Read Toc - Read TOC Header error");
+ close(cdromfd);
+ return(false);
+ }
+
++#ifdef __FreeBSD__
++ tocentry.address_format = CD_MSF_FORMAT;
++ for (i = tochdr.starting_track; i <= tochdr.ending_track; i++) {
++ tocentry.track = i;
++ if (ioctl(cdromfd, CDIOREADTOCENTRY, &tocentry) == -1)
++#else
+ tocentry.cdte_format = CDROM_MSF;
+ for (i=tochdr.cdth_trk0;i<=tochdr.cdth_trk1;i++)
+ {
+ tocentry.cdte_track = i;
+ if (ioctl(cdromfd,CDROMREADTOCENTRY,&tocentry) == -1)
++#endif
+ {
+ emit statusText((char *)"Read Toc - Read TOC Entry error");
+ close(cdromfd);
+ return(false);
+ }
++#ifdef __FreeBSD__
++ TOC[nr_tracks++] = tocentry.entry;
++ TrackOffsets.push_back( (TOC[nr_tracks-1].addr.msf.minute*60+TOC[nr_tracks-1].addr.msf.second)*75+TOC[nr_tracks-1].addr.msf.frame );
++ }
++ tocentry.track = CDROM_LEADOUT;
++ if (ioctl(cdromfd, CDIOREADTOCENTRY, &tocentry) == -1)
++#else
+ TOC[nr_tracks++] = tocentry.cdte_addr.msf;
+ TrackOffsets.push_back( (TOC[nr_tracks-1].minute*60+TOC[nr_tracks-1].second)*75+TOC[nr_tracks-1].frame );
+ }
+ tocentry.cdte_track = CDROM_LEADOUT;
+ if (ioctl(cdromfd,CDROMREADTOCENTRY,&tocentry) == -1)
++#endif
+ {
+ emit statusText((char *)"Read Toc - Read TOC Entry (Lead-out) error");
+ close(cdromfd);
+ return(false);
+ }
++#ifdef __FreeBSD__
++ TOC[nr_tracks] = tocentry.entry;
++ // cd length in seconds
++ CDLength = TOC[nr_tracks].addr.msf.minute*60 + TOC[nr_tracks].addr.msf.second;
++#else
+ TOC[nr_tracks] = tocentry.cdte_addr.msf;
+ // cd length in seconds
+ CDLength = TOC[nr_tracks].minute*60 + TOC[nr_tracks].second;
++#endif
+ // close the cdrom device
+ close(cdromfd);
+ TOCAvailable=true;
+@@ -120,10 +150,18 @@
+
+ while ( i < nr_tracks )
+ {
++#ifdef __FreeBSD__
++ n = n + cddb_sum( ( TOC[i].addr.msf.minute * 60 ) + TOC[i].addr.msf.second );
++#else
+ n = n + cddb_sum( ( TOC[i].minute * 60 ) + TOC[i].second );
++#endif
+ i++;
+ }
++#ifdef __FreeBSD__
++ t = (( TOC[nr_tracks].addr.msf.minute * 60 ) + TOC[nr_tracks].addr.msf.second ) - (( TOC[0].addr.msf.minute * 60)+ TOC[0].addr.msf.second );
++#else
+ t = (( TOC[nr_tracks].minute * 60 ) + TOC[nr_tracks].second ) - (( TOC[0].minute * 60)+ TOC[0].second );
++#endif
+ // get the discid in unsigned long
+ ulDiscID = (( n % 0xff) << 24 | t << 8 | nr_tracks);
+ // format the disc id to get a hexdecimal 8 digits string
diff --git a/print/kcdlabel/files/patch-audiocd.h b/print/kcdlabel/files/patch-audiocd.h
new file mode 100644
index 000000000000..45c723f47058
--- /dev/null
+++ b/print/kcdlabel/files/patch-audiocd.h
@@ -0,0 +1,27 @@
+--- kcdlabel/audiocd.h.orig Mon Dec 29 01:08:45 2003
++++ kcdlabel/audiocd.h Mon Dec 29 02:15:45 2003
+@@ -30,7 +30,12 @@
+ #include <qobject.h>
+ #include <qstring.h>
+
++#ifdef __FreeBSD__
++#include <sys/cdio.h>
++#define CDROM_LEADOUT 0xAA
++#else
+ #include <linux/cdrom.h> // specific to Linux !!! --> must be encapsulated in DEFINE IFDEF to enable compilation on other Un*x platforms...
++#endif
+
+ /**Access all the audio CD functions and compute CDDB DiscID
+ *@author Pascal 'PeP' Panneels
+@@ -74,7 +79,11 @@
+ QString DiscID; // CDDB DiscID
+ int cdromfd; // device descriptor of the CDROM
+ unsigned int nr_tracks; // # of tracks
++#ifdef __FreeBSD__
++ struct cd_toc_entry TOC[101]; // Table Of Content of the CD (max 99 tracks + lead-out + lead in)
++#else
+ struct cdrom_msf0 TOC[101]; // Table Of Content of the CD (max 99 tracks + lead-out + lead in)
++#endif
+ bool TOCAvailable; // true when the TOC is available
+ unsigned long ulDiscID; // computed disc id as an unsigned long
+ VectorIntType TrackOffsets; // offsets of each track
diff --git a/print/kcdlabel/files/patch-kdirtree.cpp b/print/kcdlabel/files/patch-kdirtree.cpp
new file mode 100644
index 000000000000..c349505877f3
--- /dev/null
+++ b/print/kcdlabel/files/patch-kdirtree.cpp
@@ -0,0 +1,12 @@
+--- kcdlabel/kdirtree.cpp.orig Mon Dec 29 02:18:03 2003
++++ kcdlabel/kdirtree.cpp Mon Dec 29 02:18:49 2003
+@@ -20,7 +20,9 @@
+ #include <string>
+ #include <vector>
+ #include <algorithm>
++#ifndef __FreeBSD__
+ #include <error.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
diff --git a/print/kcdlabel/pkg-descr b/print/kcdlabel/pkg-descr
new file mode 100644
index 000000000000..eefcbf07d503
--- /dev/null
+++ b/print/kcdlabel/pkg-descr
@@ -0,0 +1,5 @@
+KCDLabel is a KDE program used to create covers, labels and
+booklets for your CD cases.
+
+Author: Pascal Panneels <pascal.panneels@skynet.be>
+WWW: http://kcdlabel.sourceforge.net/
diff --git a/print/kcdlabel/pkg-plist b/print/kcdlabel/pkg-plist
new file mode 100644
index 000000000000..b32fc32ab374
--- /dev/null
+++ b/print/kcdlabel/pkg-plist
@@ -0,0 +1,40 @@
+bin/kcdlabel
+share/applnk/Multimedia/kcdlabel.desktop
+share/doc/HTML/en/kcdlabel/en.new
+share/doc/HTML/en/kcdlabel/index-1.html
+share/doc/HTML/en/kcdlabel/index-2.html
+share/doc/HTML/en/kcdlabel/index-3.html
+share/doc/HTML/en/kcdlabel/index-4.html
+share/doc/HTML/en/kcdlabel/index-5.html
+share/doc/HTML/en/kcdlabel/index.html
+share/doc/HTML/en/kcdlabel/index.sgml
+share/icons/medium/locolor/apps/kcdlabel.xpm
+share/icons/small/locolor/apps/mini-kcdlabel.xpm
+share/locale/cs/LC_MESSAGES/kcdlabel.mo
+share/locale/de/LC_MESSAGES/kcdlabel.mo
+share/locale/fr/LC_MESSAGES/kcdlabel.mo
+share/locale/hu/LC_MESSAGES/kcdlabel.mo
+share/locale/it/LC_MESSAGES/kcdlabel.mo
+@unexec rmdir %D/share/locale/it/LC_MESSAGES 2>/dev/null || true
+@unexec rmdir %D/share/locale/it 2>/dev/null || true
+@unexec rmdir %D/share/locale/hu/LC_MESSAGES 2>/dev/null || true
+@unexec rmdir %D/share/locale/hu 2>/dev/null || true
+@unexec rmdir %D/share/locale/fr/LC_MESSAGES 2>/dev/null || true
+@unexec rmdir %D/share/locale/fr 2>/dev/null || true
+@unexec rmdir %D/share/locale/de/LC_MESSAGES 2>/dev/null || true
+@unexec rmdir %D/share/locale/de 2>/dev/null || true
+@unexec rmdir %D/share/locale/cs/LC_MESSAGES 2>/dev/null || true
+@unexec rmdir %D/share/locale/cs 2>/dev/null || true
+@unexec rmdir %D/share/locale 2>/dev/null || true
+@unexec rmdir %D/share/icons/small/locolor/apps 2>/dev/null || true
+@unexec rmdir %D/share/icons/small/locolor 2>/dev/null || true
+@unexec rmdir %D/share/icons/small 2>/dev/null || true
+@unexec rmdir %D/share/icons/medium/locolor/apps 2>/dev/null || true
+@unexec rmdir %D/share/icons/medium/locolor 2>/dev/null || true
+@unexec rmdir %D/share/icons/medium 2>/dev/null || true
+@unexec rmdir %D/share/icons 2>/dev/null || true
+@dirrm share/doc/HTML/en/kcdlabel
+@unexec rmdir %D/share/doc/HTML/en 2>/dev/null || true
+@unexec rmdir %D/share/doc/HTML 2>/dev/null || true
+@unexec rmdir %D/share/applnk/Multimedia 2>/dev/null || true
+@unexec rmdir %D/share/applnk 2>/dev/null || true