Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Fedora Release Engineering
6b8042a731 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 23:56:45 +00:00
Akira TAGOH
efdad73179 Fix FTBFS
Resolves: rhbz#2341001
2025-01-27 18:50:02 +09:00
Fedora Release Engineering
454fff4bc5 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 22:21:37 +00:00
Akira TAGOH
a06bf824ed Fix build with glib 2.82
Patch from Yaakov Selkowitz
2024-09-13 21:14:48 +09:00
Yaakov Selkowitz
2728eeda35 Fix build with glib 2.82
g_utf8_next_char no longer includes a cast to char*:

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4016
2024-09-12 21:33:49 -04:00
Akira TAGOH
529b6586b2 ci: Use tmt based test cases 2024-07-25 20:49:44 +09:00
Fedora Release Engineering
f245dbf47d Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 21:27:06 +00:00
8 changed files with 115 additions and 1 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

13
paps-0.6.8-ftbfs.patch Normal file
View file

@ -0,0 +1,13 @@
バイナリーファイル paps-0.6.8.orig/src/paps-paps.o とpaps-0.6.8/src/paps-paps.o は異なります
diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
--- paps-0.6.8.orig/src/paps.c 2025-01-27 18:18:12.130570673 +0900
+++ paps-0.6.8/src/paps.c 2025-01-27 18:47:05.214883811 +0900
@@ -515,7 +515,7 @@ int main(int argc, char *argv[])
} /* if (!cups_mode) */
paps = paps_new();
- pango_context = paps_get_pango_context (paps);
+ pango_context = paps_get_pango_context ();
/* Setup pango */
pango_context_set_language (pango_context, get_language ());

12
paps-0.6.8-glib282.patch Normal file
View file

@ -0,0 +1,12 @@
diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
--- paps-0.6.8.orig/src/paps.c 2024-09-13 21:07:13.225683344 +0900
+++ paps-0.6.8/src/paps.c 2024-09-13 21:10:24.177041518 +0900
@@ -784,7 +784,7 @@ split_text_into_paragraphs (PangoContext
while (p != NULL && *p)
{
wc = g_utf8_get_char (p);
- next = g_utf8_next_char (p);
+ next = (char *) g_utf8_next_char (p);
if (wc == (gunichar)-1)
{
fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ());

34
paps-glib282.patch Normal file
View file

@ -0,0 +1,34 @@
g_utf8_next_char no longer includes a cast to char* as of 2.81.0:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4016
diff -up a/src/paps.cc b/src/paps.cc
--- a/src/paps.cc 2024-09-12 19:21:02.858439427 -0400
+++ b/src/paps.cc 2024-09-12 21:15:46.905955152 -0400
@@ -1115,7 +1115,7 @@ split_text_into_paragraphs (PangoContext
while (p != nullptr && *p)
{
wc = g_utf8_get_char (p);
- next = g_utf8_next_char (p);
+ next = (char *) g_utf8_next_char (p);
if (wc == (gunichar)-1)
{
fprintf (stderr, _("%s: Invalid character in input\n"), g_get_prgname ());
@@ -1130,7 +1130,7 @@ split_text_into_paragraphs (PangoContext
para->length = p - last_para;
/* handle dos line breaks */
if (wc == '\r' && *next == '\n')
- next = g_utf8_next_char(next);
+ next = (char *) g_utf8_next_char(next);
para->layout = pango_layout_new (pango_context);
if (page_layout->cpi > 0.0L)
@@ -1201,7 +1201,7 @@ split_text_into_paragraphs (PangoContext
g_free (newtext);
para->length = i;
- next = g_utf8_offset_to_pointer (para->text, para->length);
+ next = (char *) g_utf8_offset_to_pointer (para->text, para->length);
wc = g_utf8_get_char (g_utf8_prev_char (next));
}
else

View file

@ -1,6 +1,6 @@
Name: paps
Version: 0.8.0
Release: 9%{?dist}
Release: 14%{?dist}
License: LGPL-2.0-or-later
URL: https://github.com/dov/paps
@ -44,9 +44,12 @@ Patch60: %{name}-a3.patch
## rhbz#1214939
Patch61: %{name}-fix-paper-size-truncate.patch
Patch62: paps-c99.patch
Patch63: paps-0.6.8-glib282.patch
Patch64: paps-0.6.8-ftbfs.patch
### For paps
Patch100: %{name}-fix-src-to-paps.patch
Patch101: %{name}-fix-build.patch
Patch102: %{name}-glib282.patch
Summary: Plain Text to PostScript converter
%description
@ -68,6 +71,7 @@ This package contains a CUPS filter based on paps.
%setup -q -a 3
%patch 100 -p1 -b .src-to-paps
%patch 101 -p1 -b .build
%patch 102 -p1 -b .glib282
pushd %{name}-0.6.8
%patch 0 -p1 -b .shared
%patch 1 -p1 -b .wordwrap
@ -88,6 +92,8 @@ pushd %{name}-0.6.8
%patch 60 -p1 -b .a3
%patch 61 -p1 -b .paper-size
%patch 62 -p2 -b .configure-c99
%patch 63 -p1 -b .glib282
%patch 64 -p1 -b .ftbfs
libtoolize -f -c
autoreconf -f -i
popd
@ -151,6 +157,23 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p"
%changelog
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jan 27 2025 Akira TAGOH <tagoh@redhat.com> - 0.8.0-13
- Fix FTBFS
Resolves: rhbz#2341001
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Sep 13 2024 Akira TAGOH <tagoh@redhat.com> - 0.8.0-11
- Fix build with glib 2.82
Patch from Yaakov Selkowitz
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 7 2024 Akira TAGOH <tagoh@redhat.com> - 0.8.0-9
- Own /usr/share/paps
Resolves: rhbz#2283284

5
plans/basic.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

5
tests/basic/main.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Basic test
require:
- paps
test: ./test.sh
framework: beakerlib

21
tests/basic/test.sh Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "pushd $tmp"
rlRun "set -o pipefail"
rlPhaseEnd
rlPhaseStartTest
rlRun "paps --help | tee output" 0 "Check help message"
rlAssertGrep "paps" "output"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd