mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
office/pdfchain: Update SlackBuild
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
e4f30a0c6f
commit
183efc46b6
5 changed files with 199 additions and 21 deletions
130
office/pdfchain/patches/pdfchain-fix-crash-on-startup.patch
Normal file
130
office/pdfchain/patches/pdfchain-fix-crash-on-startup.patch
Normal file
|
@ -0,0 +1,130 @@
|
|||
From: =?utf-8?q?Hubert_Figui=C3=A8re?= <hub@figuiere.net>
|
||||
Date: Wed, 9 Mar 2016 14:49:58 -0500
|
||||
Subject: Fix crash because the RadioButtonGroup was contructed AFTER the
|
||||
RadioButton.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Description: Fix crash
|
||||
because the RadioButtonGroup was contructed AFTER the RadioButton.
|
||||
Author: Hubert Figuière <hub@figuiere.net>
|
||||
Bug-Debian: https://bugs.debian.org/725859
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pdfchain/+bug/1685778
|
||||
Bug-openSUSE: https://bugzilla.suse.com/show_bug.cgi?id=970530
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
---
|
||||
src/window_main_bgst.cc | 1 -
|
||||
src/window_main_bgst.h | 8 ++++----
|
||||
src/window_main_burst.cc | 1 -
|
||||
src/window_main_burst.h | 8 ++++----
|
||||
src/window_main_tool.cc | 2 --
|
||||
src/window_main_tool.h | 6 +++---
|
||||
6 files changed, 11 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/window_main_bgst.cc b/src/window_main_bgst.cc
|
||||
index a2c1270..cfe9025 100644
|
||||
--- a/src/window_main_bgst.cc
|
||||
+++ b/src/window_main_bgst.cc
|
||||
@@ -37,7 +37,6 @@ cSection_BgSt::cSection_BgSt( Gtk::Window& ref_window )
|
||||
mLabel_SourceFile( _("Document:") , Gtk::ALIGN_END , Gtk::ALIGN_CENTER , false ) , // label , xalign , yalign , mnemonic
|
||||
mLabel_BgStFile( _("Layer (PDF):") , Gtk::ALIGN_END , Gtk::ALIGN_CENTER , false ) ,
|
||||
|
||||
- mRBGroup_BgSt( mRButton_Background.get_group() ) ,
|
||||
mRButton_Background( mRBGroup_BgSt , _("Background") , false ) , // group , label , mnemonic
|
||||
mRButton_Stamp( mRBGroup_BgSt , _("Stamp") , false ) ,
|
||||
|
||||
diff --git a/src/window_main_bgst.h b/src/window_main_bgst.h
|
||||
index a965291..c49082b 100644
|
||||
--- a/src/window_main_bgst.h
|
||||
+++ b/src/window_main_bgst.h
|
||||
@@ -64,13 +64,13 @@ cSection_BgSt : public Gtk::VBox
|
||||
Gtk::CheckButton
|
||||
mCButton_Multiple;
|
||||
|
||||
- Gtk::RadioButton // Declaration of Gtk::RadioButton before Gtk::RadioButtonGroup!!!
|
||||
+ Gtk::RadioButtonGroup
|
||||
+ mRBGroup_BgSt;
|
||||
+
|
||||
+ Gtk::RadioButton
|
||||
mRButton_Background ,
|
||||
mRButton_Stamp;
|
||||
|
||||
- Gtk::RadioButtonGroup // Declaration of Gtk::RadioButtonGroup behind Gtk::RadioButton!!!
|
||||
- mRBGroup_BgSt;
|
||||
-
|
||||
// Derived Widgets
|
||||
cFCButton_Pdf
|
||||
mFCButton_SourceFile ,
|
||||
diff --git a/src/window_main_burst.cc b/src/window_main_burst.cc
|
||||
index dd3ded3..88a6484 100644
|
||||
--- a/src/window_main_burst.cc
|
||||
+++ b/src/window_main_burst.cc
|
||||
@@ -62,7 +62,6 @@ cSection_Burst::cSection_Burst( Gtk::Window& ref_window )
|
||||
mLabel_Digits( _("Digits:") , Gtk::ALIGN_END , Gtk::ALIGN_CENTER , false ),
|
||||
mLabel_Suffix( _("Suffix:") , Gtk::ALIGN_END , Gtk::ALIGN_CENTER , false ),
|
||||
|
||||
- mRBGroup_CounterDigits( mRButton_Auto.get_group() ),
|
||||
mRButton_Auto( mRBGroup_CounterDigits , _("Auto") , false ), // group , label , mnemonic
|
||||
mRButton_Manual( mRBGroup_CounterDigits , _("Manual:") , false ),
|
||||
|
||||
diff --git a/src/window_main_burst.h b/src/window_main_burst.h
|
||||
index e6dabd7..eae679d 100644
|
||||
--- a/src/window_main_burst.h
|
||||
+++ b/src/window_main_burst.h
|
||||
@@ -118,13 +118,13 @@ cSection_Burst : public Gtk::VBox
|
||||
Gtk::SpinButton // Declaration of Gtk::SpinButton behind Glib::RefPtr<Gtk::Adjustment>!!!
|
||||
mSButton_Digits;
|
||||
|
||||
- Gtk::RadioButton // Declaration of Gtk::RadioButton before Gtk::RadioButtonGroup!!!
|
||||
+ Gtk::RadioButtonGroup
|
||||
+ mRBGroup_CounterDigits;
|
||||
+
|
||||
+ Gtk::RadioButton
|
||||
mRButton_Auto ,
|
||||
mRButton_Manual;
|
||||
|
||||
- Gtk::RadioButtonGroup // Declaration of Gtk::RadioButtonGroup behind Gtk::RadioButton!!!
|
||||
- mRBGroup_CounterDigits;
|
||||
-
|
||||
Gtk::CheckButton
|
||||
mCButton_Extension;
|
||||
|
||||
diff --git a/src/window_main_tool.cc b/src/window_main_tool.cc
|
||||
index 3b14df0..c253cda 100644
|
||||
--- a/src/window_main_tool.cc
|
||||
+++ b/src/window_main_tool.cc
|
||||
@@ -50,8 +50,6 @@ mCButton_FillForm_DropXfa( _("Drop XFA") , false ),
|
||||
mCButton_FillForm_Flatten( _("Flatten") , false ),
|
||||
mCButton_FillForm_Appearance( _("Need appearances") , false ),
|
||||
|
||||
-mRBGroup_Tool( mRButton_UnpackFiles.get_group() ),
|
||||
-
|
||||
mRButton_Repair( mRBGroup_Tool , _("Repair docu_ment") , true ), // group , label , mnemonic
|
||||
mRButton_UnpackFiles( mRBGroup_Tool , _("Un_pack attached files from document") , true ),
|
||||
mRButton_Uncompress( mRBGroup_Tool , _("_Uncompress document") , true ),
|
||||
diff --git a/src/window_main_tool.h b/src/window_main_tool.h
|
||||
index fd96eac..c6535ec 100644
|
||||
--- a/src/window_main_tool.h
|
||||
+++ b/src/window_main_tool.h
|
||||
@@ -57,6 +57,9 @@ cSection_Tool : public Gtk::VBox
|
||||
mLabel_DumpDataFile ,
|
||||
mLabel_FdfFile;
|
||||
|
||||
+ Gtk::RadioButtonGroup
|
||||
+ mRBGroup_Tool;
|
||||
+
|
||||
Gtk::RadioButton
|
||||
mRButton_Repair ,
|
||||
mRButton_UnpackFiles ,
|
||||
@@ -71,9 +74,6 @@ cSection_Tool : public Gtk::VBox
|
||||
mRButton_Flatten ,
|
||||
mRButton_DropXfa;
|
||||
|
||||
- Gtk::RadioButtonGroup
|
||||
- mRBGroup_Tool;
|
||||
-
|
||||
Gtk::CheckButton
|
||||
mCButton_DumpDataFields_Utf8 ,
|
||||
mCButton_DumpData_Utf8 ,
|
18
office/pdfchain/patches/pdfchain-fix-desktop-file.patch
Normal file
18
office/pdfchain/patches/pdfchain-fix-desktop-file.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
Description: Change the desktop file to current standards.
|
||||
Author: Johann Felix Soden <johfel@debian.org>
|
||||
--- a/application/pdfchain.desktop
|
||||
+++ b/application/pdfchain.desktop
|
||||
@@ -1,5 +1,4 @@
|
||||
[Desktop Entry]
|
||||
-Encoding=UTF-8
|
||||
Name=PDF Chain
|
||||
GenericName=pdfchain
|
||||
Comment=A graphical user interface for the PDF Toolkit (PDFtk)
|
||||
@@ -10,6 +9,7 @@
|
||||
Categories=Office;
|
||||
MimeType=application/pdf;
|
||||
Terminal=false
|
||||
+Keywords=pdf,splitting,concatenating,form,converting,user-interface
|
||||
Comment[de]=Eine grafische Benutzerschnittstelle für das PDF Toolkit (PDFtk)
|
||||
#Comment[en]=
|
||||
Comment[es]=Interfaz del usuario grafica para el PDF Toolkit (PDFtk)
|
43
office/pdfchain/patches/pdfchain-fix-spelling.patch
Normal file
43
office/pdfchain/patches/pdfchain-fix-spelling.patch
Normal file
|
@ -0,0 +1,43 @@
|
|||
Description: Fix various spelling errors found by lintian
|
||||
Author: Johann Felix Soden <johfel@debian.org>
|
||||
--- a/src/window_main_burst.cc
|
||||
+++ b/src/window_main_burst.cc
|
||||
@@ -85,7 +85,7 @@
|
||||
mLabel_Pattern.set_tooltip_text( _("Prepare the pattern for the output PDF file names") );
|
||||
mLabel_Extended.set_tooltip_text( _("Extended options to format the pattern") );
|
||||
mLabel_SourceFile.set_tooltip_text( _("The source PDF file. "
|
||||
- "Every single page of this document will be saved in a seperate PDF file") );
|
||||
+ "Every single page of this document will be saved in a separate PDF file") );
|
||||
mLabel_Prefix.set_tooltip_text( _("Prefix part of the file name pattern") );
|
||||
mLabel_Base.set_tooltip_text( _("Numbering base for the file counter part") );
|
||||
mLabel_Digits.set_tooltip_text( _("Number of digits for the file counter part") );
|
||||
--- a/src/window_main_permission.cc
|
||||
+++ b/src/window_main_permission.cc
|
||||
@@ -54,7 +54,7 @@
|
||||
_("Protects the restrictions "
|
||||
"\nMax. 32 signs (Latin-1)") );
|
||||
mLabel_Encryption.set_tooltip_text(
|
||||
- _("If an encryption strength is given but no passwords are suplied, then the "
|
||||
+ _("If an encryption strength is given but no passwords are supplied, then the "
|
||||
"owner and user passwords remain empty, which means that the resulting "
|
||||
"PDF may be opened and its security parameters altered by anybody.") );
|
||||
mLabel_Allow.set_tooltip_text(
|
||||
@@ -64,12 +64,12 @@
|
||||
|
||||
mCButton_Printing.set_tooltip_text( _("Top quality printing") );
|
||||
mCButton_DegradedPrinting.set_tooltip_text( _("Lower quality printing") );
|
||||
- mCButton_CopyContents.set_tooltip_text( _("Allows to copy contents\n(also allows screenreaders)") );
|
||||
- mCButton_Screenreaders.set_tooltip_text( _("Allows to read contents with screenreaders") );
|
||||
- mCButton_ModifyContents.set_tooltip_text( _("Allows to modify contents\n(also allows assembly)") );
|
||||
- mCButton_Assembly.set_tooltip_text( _("Allows to assemble contents") );
|
||||
- mCButton_ModifyAnnotations.set_tooltip_text( _("Allows to modify annotations\n(also allows to fill in)") );
|
||||
- mCButton_FillIn.set_tooltip_text( _("Allows to fill in annotations") );
|
||||
+ mCButton_CopyContents.set_tooltip_text( _("Allows one to copy contents\n(also allows screenreaders)") );
|
||||
+ mCButton_Screenreaders.set_tooltip_text( _("Allows one to read contents with screenreaders") );
|
||||
+ mCButton_ModifyContents.set_tooltip_text( _("Allows one to modify contents\n(also allows assembly)") );
|
||||
+ mCButton_Assembly.set_tooltip_text( _("Allows one to assemble contents") );
|
||||
+ mCButton_ModifyAnnotations.set_tooltip_text( _("Allows one to modify annotations\n(also allows one to fill in)") );
|
||||
+ mCButton_FillIn.set_tooltip_text( _("Allows one to fill in annotations") );
|
||||
|
||||
mRButton_EncryptNone.set_tooltip_text( _("Don't encrypt output document") );
|
||||
mRButton_Encrypt40Bit.set_tooltip_text( _("Encrypt output document with RC4 40-bit cypher (PDF 1.1 - 1.3)") );
|
|
@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PRGNAM=pdfchain
|
||||
VERSION=${VERSION:-0.4.4.2}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -38,9 +38,6 @@ if [ -z "$ARCH" ]; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
|
@ -79,17 +76,10 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# pdftk is a dependency, and needs the gcc package to build. If we installed
|
||||
# that and sourced gcc5.sh, pdfchain won't build. We check for that here and
|
||||
# unset the vars.
|
||||
if [ "$CC" = "gcc-5" ] ; then
|
||||
unset CC
|
||||
unset CPP
|
||||
unset CXX
|
||||
unset AR
|
||||
unset NM
|
||||
unset RANLIB
|
||||
fi
|
||||
# patches (Found on Arch Linux AUR; however, they were originally written by Debian maintainers)
|
||||
patch -p1 < $CWD/patches/pdfchain-fix-crash-on-startup.patch
|
||||
patch -p1 < $CWD/patches/pdfchain-fix-desktop-file.patch
|
||||
patch -p1 < $CWD/patches/pdfchain-fix-spelling.patch
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS -std=c++11" \
|
||||
|
@ -107,11 +97,8 @@ make install DESTDIR=$PKG
|
|||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
sed -i s:'/usr/bin/pdfchain':'pdfchain': $PKG/usr/share/applications/$PRGNAM.desktop
|
||||
sed -i s:'/usr/share/pixmaps/pdfchain.png':'pdfchain': $PKG/usr/share/applications/$PRGNAM.desktop
|
||||
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
rm $PKG/usr/doc/$PRGNAM-$VERSION/NEWS
|
||||
rm $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
PRGNAM="pdfchain"
|
||||
VERSION="0.4.4.2"
|
||||
HOMEPAGE="http://pdfchain.sourceforge.net/index.html"
|
||||
DOWNLOAD="http://sourceforge.net/projects/pdfchain/files/pdfchain-0.4.4.2/pdfchain-0.4.4.2.tar.gz"
|
||||
HOMEPAGE="https://pdfchain.sourceforge.io/index.html"
|
||||
DOWNLOAD="https://sourceforge.net/projects/pdfchain/files/pdfchain-0.4.4.2/pdfchain-0.4.4.2.tar.gz"
|
||||
MD5SUM="8b20a3d46ea4caa174dbe12ca6bc39be"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
|
|
Loading…
Reference in a new issue