From ab6e0c520580eacb48d3d81c0e00d3655be01da8 Mon Sep 17 00:00:00 2001 From: Domingo Becker Date: Tue, 30 Oct 2012 00:20:49 -0300 Subject: [PATCH 1/2] Initial import (#730764) --- .gitignore | 1 + GNUmakefile.patch | 25 +++++++++++ sources | 1 + wxpdfdoc.spec | 110 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 137 insertions(+) create mode 100644 GNUmakefile.patch create mode 100644 wxpdfdoc.spec diff --git a/.gitignore b/.gitignore index e69de29..53f3e27 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/wxpdfdoc-0.9.2.1.tar.gz diff --git a/GNUmakefile.patch b/GNUmakefile.patch new file mode 100644 index 0000000..74306b7 --- /dev/null +++ b/GNUmakefile.patch @@ -0,0 +1,25 @@ +--- build/GNUmakefile 2011-09-16 17:22:45.000000000 -0300 ++++ build/GNUmakefile 2012-05-16 14:17:32.763992228 -0300 +@@ -19,6 +19,8 @@ + # Destination root (/ is used if empty) + DESTDIR ?= + ++WXINCLUDEDIR ?= /include/wx-2.8/wx ++ + # + AR ?= ar + +@@ -519,11 +521,9 @@ + ifeq ($(WX_SHARED),1) + install_pdfdoc_dll_headers: + $(INSTALL) -d $(DESTDIR)$(prefix) ++ $(INSTALL) -d $(DESTDIR)$(prefix)$(WXINCLUDEDIR) + for f in $(PDFDOC_DLL_HEADERS); do \ +- if test ! -d $(DESTDIR)$(prefix)/`dirname $$f` ; then \ +- $(INSTALL) -d $(DESTDIR)$(prefix)/`dirname $$f`; \ +- fi; \ +- $(INSTALL) -m 644 ../$$f $(DESTDIR)$(prefix)/$$f; \ ++ $(INSTALL) -m 644 ../$$f $(DESTDIR)$(prefix)$(WXINCLUDEDIR); \ + done + endif + diff --git a/sources b/sources index e69de29..04df513 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c664be9f77cd422e7d6f5034aa93e675 wxpdfdoc-0.9.2.1.tar.gz diff --git a/wxpdfdoc.spec b/wxpdfdoc.spec new file mode 100644 index 0000000..bce4713 --- /dev/null +++ b/wxpdfdoc.spec @@ -0,0 +1,110 @@ +Name: wxpdfdoc +Version: 0.9.2.1 +Release: 4%{?dist} +Summary: A library for creating PDF documents in C++ with wxWidgets +Group: System Environment/Libraries +License: wxWidgets +URL: http://wxcode.sourceforge.net/components/wxpdfdoc/ +Source: http://sourceforge.net/projects/wxcode/files/Components/wxPdfDocument/wxpdfdoc-%{version}.tar.gz +Patch: http://beckerde.fedorapeople.org/wxpdfdoc/GNUmakefile.patch +BuildRequires: wxGTK-devel + +%global _wxdir /wx-2.8/wx +%global _inclwxdir /include%{_wxdir} + + +%description +wxPdfDocument allows wxWidgets applications to generate PDF documents. +The code is a port of FPDF - a free PHP class for generating PDF files - +to C++ using the wxWidgets library. Several add-on PHP scripts found on +the FPDF web site are incorporated into wxPdfDocument. Embedding of PNG, +JPEG, GIF and WMF images is supported. In addition to the 14 standard +Adobe fonts it is possible to use other Type1 or TrueType fonts - with +or without embedding them into the generated document. In Unicode build +CJK fonts are supported, too. Graphics primitives allow the creation of +simple drawings. + + +%package devel +Summary: Development files needed for the wxPdfDocument library +Group: System Environment/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: wxGTK-devel + + +%description devel +wxPdfDocument allows wxWidgets applications to generate PDF documents. +This package contains the development files needed to use the +wxPdfDocument library. + + +%prep +%setup -q +chmod 644 *.txt +chmod 644 docs/* +chmod 755 docs/html +chmod 644 docs/html/* +chmod 644 src/*.cpp src/*.h src/*.inc +chmod 644 include/wx/*.h +sed -i.orig -e 's|$(prefix)/lib|$(prefix)/%{_lib}|g' build/GNUmakefile +%patch + + +%build +echo %{ver} +echo %{ver2} +make -C build all -f GNUmakefile + + +%install +make -C build prefix=$RPM_BUILD_ROOT%{_prefix} install_pdfdoc_dll -f GNUmakefile +make -C build prefix=$RPM_BUILD_ROOT%{_prefix} WXINCLUDEDIR=%{_inclwxdir} install_pdfdoc_dll_headers -f GNUmakefile + + +%post -p /sbin/ldconfig + + +%postun -p /sbin/ldconfig + + +%files +%{_libdir}/libwxcode_gtk2_pdfdoc* +%doc LICENCE.txt Readme.txt docs/* + + +%files devel +%{_includedir}%{_wxdir}/pdf* + + +%changelog +* Sun Oct 28 2012 Domingo Becker - 0.9.2.1-4 +- Removed BuildRoot definition. +- Removed initial cleaning of buildroot in install section. +- Removed clean section. +- Removed defattr lines in files section. + +* Sun Oct 21 2012 Domingo Becker - 0.9.2.1-3 +- Fixed macro in comment warning by removing all unnecessary comments. +- Removed spurious executable permission on source files. + +* Wed May 16 2012 Domingo Becker - 0.9.2.1-2 +- Apply patch to build/GNUmakefile to install headers in the correct directory. + +* Mon May 07 2012 Domingo Becker - 0.9.2.1-1 +- Updated to new upstream version. +- Fixed required base package. +- Group set to System Environment/Libraries. +- Removed gcc-c++ as requires. +- Added wxGTK-devel dependency in -devel package. + +* Tue Aug 16 2011 Domingo Becker - 0.9.1-3 +- Fixed for a proper multilib support. +- devel package requires core package. + +* Tue Aug 16 2011 Domingo Becker - 0.9.1-2 +- Fixed lib64 dir name issue in x86_64 with a patch. + +* Mon Aug 15 2011 Domingo Becker - 0.9.1-1 +- Initial version. + + From b6e151cdbd80308d23db1df9e1038cd5973b1fbc Mon Sep 17 00:00:00 2001 From: Domingo Becker Date: Mon, 24 Dec 2012 01:13:40 -0300 Subject: [PATCH 2/2] Updated to new upstream version. --- .gitignore | 1 + GNUmakefile.patch | 19 +++++++++++++++---- sources | 2 +- wxpdfdoc.spec | 16 ++++++++++++---- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 53f3e27..4845df2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /wxpdfdoc-0.9.2.1.tar.gz +/wxpdfdoc-0.9.3.tar.gz diff --git a/GNUmakefile.patch b/GNUmakefile.patch index 74306b7..564dc00 100644 --- a/GNUmakefile.patch +++ b/GNUmakefile.patch @@ -1,6 +1,8 @@ ---- build/GNUmakefile 2011-09-16 17:22:45.000000000 -0300 -+++ build/GNUmakefile 2012-05-16 14:17:32.763992228 -0300 -@@ -19,6 +19,8 @@ +diff --git a/build/GNUmakefile b/build/GNUmakefile +index 207de2b..a781fc2 100755 +--- a/build/GNUmakefile ++++ b/build/GNUmakefile +@@ -19,6 +19,8 @@ prefix ?= /usr/local # Destination root (/ is used if empty) DESTDIR ?= @@ -9,7 +11,7 @@ # AR ?= ar -@@ -519,11 +521,9 @@ +@@ -524,11 +526,9 @@ make_dir_pdfdoc_dll: ifeq ($(WX_SHARED),1) install_pdfdoc_dll_headers: $(INSTALL) -d $(DESTDIR)$(prefix) @@ -23,3 +25,12 @@ done endif +@@ -543,7 +543,7 @@ endif + $(CXX) -o $@ $(MINIMAL_OBJECTS) $(VAR_7) -L../lib $(LDFLAGS) $(__COMPONENT_LIB_LIBR) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs xml,core,base` + + ../samples/pdfdc/printing: $(DCSAMPLE_OBJECTS) $(__COMPONENT_LIB_DEP) +- $(CXX) -o $@ $(DCSAMPLE_OBJECTS) $(VAR_7) -L../lib $(LDFLAGS) $(__COMPONENT_LIB_LIBR) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs xml,core,base` ++ $(CXX) -o $@ $(DCSAMPLE_OBJECTS) $(VAR_7) -L../lib $(LDFLAGS) $(__COMPONENT_LIB_LIBR) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs xml,core,base,richtext,html` + + ../makefont/makefont: $(MAKEFONT_OBJECTS) $(__COMPONENT_LIB_DEP) + $(CXX) -o $@ $(MAKEFONT_OBJECTS) $(VAR_7) -L../lib $(LDFLAGS) $(__COMPONENT_LIB_LIBR) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs xml,core,base` diff --git a/sources b/sources index 04df513..e240409 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c664be9f77cd422e7d6f5034aa93e675 wxpdfdoc-0.9.2.1.tar.gz +0c853fdf7ad19f936431b15e679c0361 wxpdfdoc-0.9.3.tar.gz diff --git a/wxpdfdoc.spec b/wxpdfdoc.spec index bce4713..4530f2a 100644 --- a/wxpdfdoc.spec +++ b/wxpdfdoc.spec @@ -1,6 +1,6 @@ Name: wxpdfdoc -Version: 0.9.2.1 -Release: 4%{?dist} +Version: 0.9.3 +Release: 1%{?dist} Summary: A library for creating PDF documents in C++ with wxWidgets Group: System Environment/Libraries License: wxWidgets @@ -47,7 +47,8 @@ chmod 644 docs/html/* chmod 644 src/*.cpp src/*.h src/*.inc chmod 644 include/wx/*.h sed -i.orig -e 's|$(prefix)/lib|$(prefix)/%{_lib}|g' build/GNUmakefile -%patch +%patch -p 1 +rm -f docs/Doxyfile %build @@ -69,14 +70,21 @@ make -C build prefix=$RPM_BUILD_ROOT%{_prefix} WXINCLUDEDIR=%{_inclwxdir} instal %files %{_libdir}/libwxcode_gtk2_pdfdoc* -%doc LICENCE.txt Readme.txt docs/* +%doc LICENCE.txt %files devel %{_includedir}%{_wxdir}/pdf* +%doc Readme.txt docs/* %changelog +* Mon Dec 24 2012 Domingo Becker - 0.9.3-1 +- Updated to latest upstream version. +- Moved Readme.txt and docs/html to -devel package (Bug #889889). +- Removed Doxyfile from installed package (Bug #889889). +- Updated patch for build/GNUmakefile for the new version and to fix a missing library problem with samples/pdfdc/printing. + * Sun Oct 28 2012 Domingo Becker - 0.9.2.1-4 - Removed BuildRoot definition. - Removed initial cleaning of buildroot in install section.