[packages/cdp] Rel 32
arekm
arekm at pld-linux.org
Wed May 20 18:42:56 CEST 2026
commit 8cead49bf0f4cdecfb9b86245d20299311c5cddd
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed May 20 18:42:40 2026 +0200
Rel 32
cdp-glibc.patch | 10 -----
cdp-modern-cc.patch | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++
cdp.spec | 20 +++++-----
3 files changed, 121 insertions(+), 20 deletions(-)
---
diff --git a/cdp.spec b/cdp.spec
index 6c5e3d8..dc1553e 100644
--- a/cdp.spec
+++ b/cdp.spec
@@ -5,7 +5,7 @@ Summary(pl.UTF-8): Pełnoekranowy, tekstowy program do odtwarzania płyt CD
Summary(tr.UTF-8): Müzik CD'lerini çalmak için bir metin ekran programı
Name: cdp
Version: 0.33
-Release: 31
+Release: 32
License: GPL
Group: Applications/Sound
Source0: ftp://sunsite.unc.edu/pub/Linux/apps/sound/cdrom/curses/%{name}-%{version}.tgz
@@ -13,14 +13,14 @@ Source0: ftp://sunsite.unc.edu/pub/Linux/apps/sound/cdrom/curses/%{name}-%{versi
Patch0: %{name}-fsstnd.patch
Patch1: %{name}-cdplay.patch
Patch2: %{name}-ncurses.patch
-Patch3: %{name}-glibc.patch
-Patch4: %{name}-strchr.patch
-Patch5: %{name}-FHS20.patch
-Patch6: %{name}-changer.patch
-Patch7: %{name}-keys.patch
-Patch8: %{name}-nonblock.patch
-Patch9: %{name}-bo_fix.patch
-Patch10: %{name}-getline.patch
+Patch3: %{name}-strchr.patch
+Patch4: %{name}-FHS20.patch
+Patch5: %{name}-changer.patch
+Patch6: %{name}-keys.patch
+Patch7: %{name}-nonblock.patch
+Patch8: %{name}-bo_fix.patch
+Patch9: %{name}-getline.patch
+Patch10: %{name}-modern-cc.patch
BuildRequires: ncurses-devel >= 5.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -62,7 +62,7 @@ kullanabilirsiniz.
%patch -P10 -p1
%build
-%{__make} COMP_OPT="%{rpmcflags} -Wall"
+%{__make} COMP_OPT="%{rpmcflags} %{rpmcppflags} -Wall"
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/cdp-glibc.patch b/cdp-glibc.patch
deleted file mode 100644
index 8cc63f4..0000000
--- a/cdp-glibc.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- cdp-0.33/hardware.c.ewt Thu Jul 10 14:35:41 1997
-+++ cdp-0.33/hardware.c Thu Jul 10 14:35:49 1997
-@@ -15,6 +15,7 @@
- #include <sys/param.h>
- #include <sys/stat.h>
- #include <sys/time.h>
-+#include <sys/ustat.h>
- #ifdef linux
- # include <linux/cdrom.h>
- #else
diff --git a/cdp-modern-cc.patch b/cdp-modern-cc.patch
new file mode 100644
index 0000000..1196769
--- /dev/null
+++ b/cdp-modern-cc.patch
@@ -0,0 +1,111 @@
+--- cdp-0.33.orig/hardware.c 2026-05-20 18:31:08.876406411 +0200
++++ cdp-0.33/hardware.c 2026-05-20 18:31:26.592888931 +0200
+@@ -15,6 +15,7 @@
+ #include <sys/param.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
++#include <mntent.h>
+ #ifdef linux
+ # include <linux/cdrom.h>
+ #else
+@@ -450,7 +451,10 @@
+ GLOBAL int cd_eject( cdStatusType * pStatus )
+ {
+ struct stat stbuf;
+- struct ustat ust;
++ FILE * mtab;
++ struct mntent * mnt;
++ struct stat mstbuf;
++ int mounted = 0;
+
+ if (pStatus->cur_cdmode == 5) /* Already ejected! */
+ return (0);
+@@ -459,8 +463,20 @@
+ perror ("fstat");
+ return (1);
+ }
+- /* Is this a mounted filesystem? */
+- if (ustat (stbuf.st_rdev, &ust) == 0)
++ /* Is this a mounted filesystem? Walk /proc/mounts to find out. */
++ mtab = setmntent ("/proc/mounts", "r");
++ if (mtab != NULL) {
++ while ((mnt = getmntent (mtab)) != NULL) {
++ if (stat (mnt->mnt_fsname, &mstbuf) == 0
++ && S_ISBLK (mstbuf.st_mode)
++ && mstbuf.st_rdev == stbuf.st_rdev) {
++ mounted = 1;
++ break;
++ }
++ }
++ endmntent (mtab);
++ }
++ if (mounted)
+ return (2);
+
+ if (ioctl (pStatus->cd_fd, CDROMEJECT)) {
+--- cdp-0.33.orig/database.c 2026-05-20 18:31:08.869285433 +0200
++++ cdp-0.33/database.c 2026-05-20 18:31:31.852888930 +0200
+@@ -31,10 +31,6 @@
+ #define SWALLOW_LINE(fp) { int c; while ((c = getc(fp)) != '\n' && c != EOF); }
+
+
+-void *malloc (),
+- *realloc ();
+-char *getenv ();
+-
+ int suppress_locking = 0; /* Turn off locking of datafile (dangerous) */
+
+ char *rcfile = NULL; /* Personal rcfile */
+--- cdp-0.33.orig/struct.h 1995-11-10 07:10:42.000000000 +0100
++++ cdp-0.33/struct.h 2026-05-20 18:31:35.642888930 +0200
+@@ -68,7 +68,7 @@
+ /* The global variable "cd" points to the struct for the CD that's playing. */
+ /* extern struct cdinfo *cd; */
+
+-struct playlist *new_list();
++struct playlist *new_list(struct cdinfo *cd, char *listname);
+
+
+
+--- cdp-0.33.orig/display.c 2026-05-20 18:31:08.879574772 +0200
++++ cdp-0.33/display.c 2026-05-20 18:31:44.829555597 +0200
+@@ -98,7 +98,7 @@
+ }
+
+ wmove( pw, y, x );
+- wprintw( pw, str );
++ wprintw( pw, "%s", str );
+ wstandend( pw );
+ x += strlen( str );
+ str = pos + 1;
+@@ -135,7 +135,7 @@
+ if ( len > ( width - 2 ) )
+ lpszBuf[ width - 1 ] = '>';
+
+- mvwprintw( pw, y, x, lpszBuf );
++ mvwprintw( pw, y, x, "%s", lpszBuf );
+ free( lpszBuf );
+ }
+
+--- cdp-0.33.orig/getline.c 2026-05-20 18:31:08.879751729 +0200
++++ cdp-0.33/getline.c 2026-05-20 18:31:49.279555596 +0200
+@@ -69,7 +69,7 @@
+ else
+ wattrset( pw, pInfo->attrText );
+
+- mvwprintw( pw, 0, 1, pInfo->text + pInfo->startPos );
++ mvwprintw( pw, 0, 1, "%s", pInfo->text + pInfo->startPos );
+ wmove( pw, 0, pInfo->cursorPos - pInfo->startPos + 1 );
+
+ wrefresh( pw );
+--- cdp-0.33.orig/Makefile 2026-05-20 18:31:08.870900260 +0200
++++ cdp-0.33/Makefile 2026-05-20 18:32:59.082888876 +0200
+@@ -56,7 +56,7 @@
+ install: cdp cdp.1.Z
+ chmod 755 cdp
+ chmod 644 cdp.1.Z
+- install -m 755 -s cdp $(DESTDIR)/usr/bin
++ install -m 755 cdp $(DESTDIR)/usr/bin
+ ln -sf cdp $(DESTDIR)/usr/bin/cdplay
+ install -m 644 cdp.1 $(DESTDIR)/usr/share/man/man1
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cdp.git/commitdiff/8cead49bf0f4cdecfb9b86245d20299311c5cddd
More information about the pld-cvs-commit
mailing list