diff --git a/xmlgraphics-fop-fontlist.script b/xmlgraphics-fop-fontlist.script index 0cef1b6..197b3c6 100644 --- a/xmlgraphics-fop-fontlist.script +++ b/xmlgraphics-fop-fontlist.script @@ -11,6 +11,15 @@ fi if [ -f /etc/fop.conf ]; then . /etc/fop.conf fi +fopxconf=/etc/fop.xconf +fop_exec_args= +if [ -f "$fopxconf" ] ; then + config_found=0 + for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done + if [ $config_found = 0 ]; then + fop_exec_args="-c $fopxconf $fop_exec_args" + fi +fi # Load user configuration if [ -f "$HOME/.foprc" ]; then @@ -29,4 +38,4 @@ set_flags $BASE_FLAGS set_options $BASE_OPTIONS $FOP_OPTS # Let's start -run "$@" +run $fop_exec_args "$@" diff --git a/xmlgraphics-fop-fontmetrics.script b/xmlgraphics-fop-fontmetrics.script index 5d9fa05..04d6582 100644 --- a/xmlgraphics-fop-fontmetrics.script +++ b/xmlgraphics-fop-fontmetrics.script @@ -17,6 +17,15 @@ fi if [ -f "$HOME/.foprc" ]; then . "$HOME/.foprc" fi +fopxconf=/etc/fop.xconf +fop_exec_args= +if [ -f "$fopxconf" ] ; then + config_found=0 + for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done + if [ $config_found = 0 ]; then + fop_exec_args="-c $fopxconf $fop_exec_args" + fi +fi # Rest of the configuration MAIN_CLASS_PFM=org.apache.fop.fonts.apps.PFMReader @@ -41,4 +50,4 @@ set_flags $BASE_FLAGS set_options $BASE_OPTIONS $FOP_OPTS # Let's start -run "$@" +run $fop_exec_args "$@" diff --git a/xmlgraphics-fop-xconf.patch b/xmlgraphics-fop-xconf.patch new file mode 100644 index 0000000..f8ec029 --- /dev/null +++ b/xmlgraphics-fop-xconf.patch @@ -0,0 +1,10 @@ +--- fop-1.1.orig/conf/fop.xconf 2012-11-11 10:53:23.000000000 +0400 ++++ fop-1.1/conf/fop.xconf 2012-12-09 10:57:56.000000000 +0400 +@@ -78,6 +78,7 @@ + + + --> ++ + + + diff --git a/xmlgraphics-fop.changes b/xmlgraphics-fop.changes index 16e75a8..8b127e0 100644 --- a/xmlgraphics-fop.changes +++ b/xmlgraphics-fop.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Dec 9 08:29:33 UTC 2012 - slavb18@gmail.com + +- patched fop.xconf + * added to pdf renderer section, so now possible to use system fonts like font-family="DejaVuSansMono" +- fix the spec file to install a (default) fop.xconf file in /etc +- patched scripts to use /etc/fop.xconf + ------------------------------------------------------------------- Tue Nov 20 12:53:08 UTC 2012 - mvyskocil@suse.com diff --git a/xmlgraphics-fop.script b/xmlgraphics-fop.script index ea00638..fe70d3f 100644 --- a/xmlgraphics-fop.script +++ b/xmlgraphics-fop.script @@ -16,6 +16,15 @@ fi if [ -f /etc/fop.conf ]; then . /etc/fop.conf fi +fopxconf=/etc/fop.xconf +fop_exec_args= +if [ -f "$fopxconf" ] ; then + config_found=0 + for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done + if [ $config_found = 0 ]; then + fop_exec_args="-c $fopxconf $fop_exec_args" + fi +fi # Load user configuration if [ -f "$HOME/.foprc" ]; then @@ -33,4 +42,4 @@ set_flags $BASE_FLAGS set_options $BASE_OPTIONS $FOP_OPTS # Let's start -run "$@" +run $fop_exec_args "$@" diff --git a/xmlgraphics-fop.spec b/xmlgraphics-fop.spec index 68c5597..f849456 100644 --- a/xmlgraphics-fop.spec +++ b/xmlgraphics-fop.spec @@ -42,6 +42,7 @@ Source11: %{name}-fontmetrics.xml Source12: %{name}-fontlist.xml Source1000: http://ftp.halifax.rwth-aachen.de/apache/xmlgraphics/fop/source/fop-1.1-src.tar.gz.asc Patch1: xmlgraphics-fop-cli.patch +Patch2: xmlgraphics-fop-xconf.patch Url: http://xmlgraphics.apache.org/fop/ Requires(post): jpackage-utils >= 1.7.4 Requires(postun): jpackage-utils >= 1.7.4 @@ -99,6 +100,7 @@ API documentation for %{name} automatically extracted from comments in source fi ln -thyph offo-hyphenation/hyph/*.xml find -name "*.jar" | xargs -t rm %patch1 -p1 -b .cli +%patch2 -p1 -b .cli cp %{SOURCE2} %{SOURCE3} %{SOURCE4} . # Replace keyword "VERSION" in XML files with the real one: @@ -178,6 +180,7 @@ ln -s %{name}-fontlist %{buildroot}%{_bindir}/%{bname}-fontlist mkdir -p %{buildroot}%{_datadir}/%{name} cp -pr hyph %{buildroot}%{_datadir}/%{name} cp -pr conf %{buildroot}%{_datadir}/%{name} +install -D -m 644 conf/fop.xconf %{buildroot}/etc/fop.xconf # javadoc mkdir -p %{buildroot}%{_javadocdir}/%{name} @@ -222,6 +225,7 @@ rm -rf %{buildroot} %{_datadir}/maven2/* %config %{_mavendepmapfragdir}/* %{_mandir}/man1/* +%config(noreplace) /etc/fop.xconf %files javadoc %defattr(0644,root,root,0755)