Add patches to fix building with newer gnutls and gcc6, Add patch to fix Wordperfect support
This commit is contained in:
parent
41617ae6d8
commit
c0d6dffbd1
31
abiword-3.0.1-fixwps.patch
Normal file
31
abiword-3.0.1-fixwps.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- abiword-3.0.1/plugin-configure.m4.orig 2016-04-10 14:22:18.271356761 +0100
|
||||
+++ abiword-3.0.1/plugin-configure.m4 2016-04-10 14:24:22.493303398 +0100
|
||||
@@ -1355,7 +1355,7 @@
|
||||
AC_SUBST([BMP_LIBS])
|
||||
|
||||
|
||||
-wpg_pkgs="$gsf_req libwpg-0.3 libwpd-0.10 librevenge-0.0 librevenge-stream-0.0"
|
||||
+wpg_pkgs="libwpg-0.3 $gsf_req"
|
||||
wpg_deps="no"
|
||||
|
||||
if test "$enable_wpg" != ""; then
|
||||
@@ -1469,8 +1469,8 @@
|
||||
AC_SUBST([AIKSAURUS_LIBS])
|
||||
|
||||
|
||||
-wordperfect_pkgs="libwpg-0.3 libwpd-0.10 librevenge-0.0 librevenge-stream-0.0 $gsf_req"
|
||||
-wordperfect_wps_pkgs='libwps-0.4'
|
||||
+wordperfect_pkgs="libwpd-0.10 $gsf_req"
|
||||
+wordperfect_wps_pkgs='libwps-0.3'
|
||||
wordperfect_deps="no"
|
||||
|
||||
WORDPERFECT_CFLAGS=
|
||||
@@ -1499,7 +1499,7 @@
|
||||
|
||||
PKG_CHECK_EXISTS([ $wordperfect_wps_pkgs ],
|
||||
[
|
||||
- wp_deps_pkgs="$wp_deps_pkgs $wordperfect_wps_pkgs"
|
||||
+ wp_deps_pkgs="$wordperfect_wps_pkgs $wp_deps_pkgs"
|
||||
WPS_DEFINE=" -DHAVE_LIBWPS"
|
||||
])
|
||||
|
263
abiword-3.0.1-gcc6.patch
Normal file
263
abiword-3.0.1-gcc6.patch
Normal file
@ -0,0 +1,263 @@
|
||||
Index: src/af/xap/cocoa/xap_CocoaApp.h
|
||||
===================================================================
|
||||
--- src/af/xap/cocoa/xap_CocoaApp.h (revision 35181)
|
||||
+++ src/af/xap/cocoa/xap_CocoaApp.h (working copy)
|
||||
@@ -65,7 +65,7 @@
|
||||
virtual void copyToClipboard(PD_DocumentRange * pDocRange, bool bUseClipboard = true) = 0;
|
||||
virtual void pasteFromClipboard(PD_DocumentRange * pDocRange, bool bUseClipboard, bool bHonorFormatting = true) = 0;
|
||||
virtual bool canPasteFromClipboard() = 0;
|
||||
- virtual const char * getUserPrivateDirectory();
|
||||
+ virtual const char * getUserPrivateDirectory() const;
|
||||
virtual bool findAbiSuiteBundleFile(std::string & path, const char * filename, const char * subdir = 0); // checks only bundle
|
||||
virtual bool findAbiSuiteLibFile(std::string & path, const char * filename, const char * subdir = 0);
|
||||
virtual bool findAbiSuiteAppFile(std::string & path, const char * filename, const char * subdir = 0); // doesn't check user-dir
|
||||
Index: src/af/xap/cocoa/xap_CocoaApp.cpp
|
||||
===================================================================
|
||||
--- src/af/xap/cocoa/xap_CocoaApp.cpp (revision 35181)
|
||||
+++ src/af/xap/cocoa/xap_CocoaApp.cpp (working copy)
|
||||
@@ -192,7 +192,7 @@
|
||||
*flags = m_geometry.flags;
|
||||
}
|
||||
|
||||
-const char * XAP_CocoaApp::getUserPrivateDirectory()
|
||||
+const char * XAP_CocoaApp::getUserPrivateDirectory() const
|
||||
{
|
||||
static const char * szAbiDir = "Library/Application Support/AbiSuite";
|
||||
|
||||
Index: src/af/xap/gtk/xap_UnixApp.h
|
||||
===================================================================
|
||||
--- src/af/xap/gtk/xap_UnixApp.h (revision 35181)
|
||||
+++ src/af/xap/gtk/xap_UnixApp.h (working copy)
|
||||
@@ -73,7 +73,7 @@
|
||||
virtual void pasteFromClipboard(PD_DocumentRange * pDocRange, bool bUseClipboard, bool bHonorFormatting = true) = 0;
|
||||
virtual bool canPasteFromClipboard() = 0;
|
||||
void migrate(const char *oldName, const char *newName, const char *path) const;
|
||||
- virtual const char * getUserPrivateDirectory();
|
||||
+ virtual const char * getUserPrivateDirectory() const;
|
||||
|
||||
virtual void setSelectionStatus(AV_View * pView) = 0;
|
||||
virtual void clearSelection() = 0;
|
||||
Index: src/af/xap/gtk/xap_UnixApp.cpp
|
||||
===================================================================
|
||||
--- src/af/xap/gtk/xap_UnixApp.cpp (revision 35181)
|
||||
+++ src/af/xap/gtk/xap_UnixApp.cpp (working copy)
|
||||
@@ -207,70 +207,60 @@
|
||||
}
|
||||
|
||||
// This should be removed at some time.
|
||||
-void XAP_UnixApp::migrate (const char *oldName, const char *newName, const char *path) const
|
||||
+void XAP_UnixApp::migrate(const char *oldName,
|
||||
+ const char *newName, const char *path) const
|
||||
{
|
||||
- if (path && newName && oldName && (*oldName == '/'))
|
||||
- {
|
||||
- char *old = new char[strlen(path) - strlen(newName) + strlen(oldName)];
|
||||
-
|
||||
- if (old)
|
||||
- {
|
||||
- size_t len = strrchr(path, '/') - path;
|
||||
- strncpy(old, path, len);
|
||||
- old[len] = 0;
|
||||
- strcat(old, oldName);
|
||||
+ if (path && newName && oldName && (*oldName == '/')) {
|
||||
|
||||
- if (g_access(old, F_OK) == 0)
|
||||
- {
|
||||
- UT_WARNINGMSG(("Renaming: %s -> %s\n", old, path));
|
||||
- g_rename(old, path);
|
||||
- }
|
||||
-
|
||||
- delete[] old;
|
||||
- }
|
||||
- }
|
||||
+ const char* end = strrchr(path, '/');
|
||||
+ if (!end) {
|
||||
+ UT_WARNINGMSG(("invalid path '%s', '/' not found", path));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ std::string old(path, end);
|
||||
+ old += oldName;
|
||||
+
|
||||
+ if (g_access(old.c_str(), F_OK) == 0) {
|
||||
+ UT_WARNINGMSG(("Renaming: %s -> %s\n", old.c_str(), path));
|
||||
+ g_rename(old.c_str(), path);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
-
|
||||
-const char * XAP_UnixApp::getUserPrivateDirectory()
|
||||
+
|
||||
+const char * XAP_UnixApp::getUserPrivateDirectory() const
|
||||
{
|
||||
- /* return a pointer to a static buffer */
|
||||
- static char *buf = NULL;
|
||||
+ /* return a pointer to a static buffer */
|
||||
+ static std::string private_dir;
|
||||
|
||||
- if (buf == NULL)
|
||||
- {
|
||||
- const char * szAbiDir = "abiword";
|
||||
- const char * szCfgDir = ".config";
|
||||
+ if (private_dir.empty()) {
|
||||
+ const char * szAbiDir = "abiword";
|
||||
+ const char * szCfgDir = ".config";
|
||||
|
||||
- const char * szXDG = getenv("XDG_CONFIG_HOME");
|
||||
- if (!szXDG || !*szXDG) {
|
||||
- const char * szHome = getenv("HOME");
|
||||
- if (!szHome || !*szHome)
|
||||
- szHome = "./";
|
||||
+ const char * szXDG = getenv("XDG_CONFIG_HOME");
|
||||
+ if (!szXDG || !*szXDG) {
|
||||
+ const char * szHome = getenv("HOME");
|
||||
+ if (!szHome || !*szHome)
|
||||
+ szHome = "./";
|
||||
|
||||
- buf = new char[strlen(szHome)+strlen(szCfgDir)+strlen(szAbiDir)+4];
|
||||
+ private_dir = szHome;
|
||||
+ if (szHome[strlen(szHome)-1] != '/') {
|
||||
+ private_dir.push_back('/');
|
||||
+ }
|
||||
+ private_dir += szCfgDir;
|
||||
+ } else {
|
||||
+ private_dir = szXDG;
|
||||
+ }
|
||||
|
||||
- strcpy(buf, szHome);
|
||||
- if (buf[strlen(buf)-1] != '/')
|
||||
- strcat(buf, "/");
|
||||
- strcat(buf, szCfgDir);
|
||||
- } else {
|
||||
- buf = new char[strlen(szXDG)+strlen(szAbiDir)+4];
|
||||
- strcpy(buf, szXDG);
|
||||
- }
|
||||
+ private_dir += '/';
|
||||
+ private_dir += szAbiDir;
|
||||
|
||||
- strcat(buf, "/");
|
||||
- strcat(buf, szAbiDir);
|
||||
-
|
||||
-#ifdef PATH_MAX
|
||||
- if (strlen(buf) >= PATH_MAX)
|
||||
- DELETEPV(buf);
|
||||
-#endif
|
||||
-
|
||||
- // migration / legacy
|
||||
- migrate("/AbiSuite", szAbiDir, buf);
|
||||
+ // migration / legacy
|
||||
+ // XXX shouldn't that be /.AbiSuite ?
|
||||
+ migrate("/AbiSuite", szAbiDir, private_dir.c_str());
|
||||
}
|
||||
|
||||
- return buf;
|
||||
+ return private_dir.c_str();
|
||||
}
|
||||
|
||||
|
||||
Index: src/af/xap/xp/xap_App.h
|
||||
===================================================================
|
||||
--- src/af/xap/xp/xap_App.h (revision 35181)
|
||||
+++ src/af/xap/xp/xap_App.h (working copy)
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
virtual const XAP_StringSet * getStringSet() const = 0;
|
||||
virtual void migrate(const char *oldName, const char *newName, const char *path) const;
|
||||
- virtual const char * getUserPrivateDirectory() = 0;
|
||||
+ virtual const char * getUserPrivateDirectory() const = 0;
|
||||
virtual const char * getAbiSuiteLibDir() const;
|
||||
virtual const char * getAbiSuiteAppDir() const = 0;
|
||||
virtual bool findAbiSuiteLibFile(std::string & path, const char * filename, const char * subdir = 0);
|
||||
Index: src/af/xap/win/xap_Win32App.h
|
||||
===================================================================
|
||||
--- src/af/xap/win/xap_Win32App.h (revision 35181)
|
||||
+++ src/af/xap/win/xap_Win32App.h (working copy)
|
||||
@@ -65,7 +65,7 @@
|
||||
virtual void pasteFromClipboard(PD_DocumentRange * pDocRange, bool, bool) = 0;
|
||||
virtual bool canPasteFromClipboard(void) = 0;
|
||||
virtual void cacheCurrentSelection(AV_View *) = 0;
|
||||
- virtual const char * getUserPrivateDirectory(void);
|
||||
+ virtual const char * getUserPrivateDirectory(void) const;
|
||||
|
||||
virtual HICON getIcon(void) = 0;
|
||||
virtual HICON getSmallIcon(void) = 0;
|
||||
Index: src/af/xap/win/xap_Win32App.cpp
|
||||
===================================================================
|
||||
--- src/af/xap/win/xap_Win32App.cpp (revision 35181)
|
||||
+++ src/af/xap/win/xap_Win32App.cpp (working copy)
|
||||
@@ -238,7 +238,7 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
-const char * XAP_Win32App::getUserPrivateDirectory(void)
|
||||
+const char * XAP_Win32App::getUserPrivateDirectory(void) const
|
||||
{
|
||||
/* return a pointer to a static buffer */
|
||||
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
--- configure.ac (revision 35181)
|
||||
+++ configure.ac (working copy)
|
||||
@@ -616,7 +616,7 @@
|
||||
#
|
||||
|
||||
# We need libpng
|
||||
-for l in libpng libpng14 libpng12; do
|
||||
+for l in libpng libpng16 libpng14 libpng12; do
|
||||
AC_MSG_CHECKING(for $l)
|
||||
if $PKG_CONFIG --exists $l ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
Index: plugins/xslfo/xp/ie_exp_XSL-FO.cpp
|
||||
===================================================================
|
||||
--- plugins/xslfo/xp/ie_exp_XSL-FO.cpp (revision 35181)
|
||||
+++ plugins/xslfo/xp/ie_exp_XSL-FO.cpp (working copy)
|
||||
@@ -1451,7 +1451,7 @@
|
||||
{ \
|
||||
UT_UTF8String esc = szValue; \
|
||||
esc.escapeXML(); \
|
||||
- buf += " "x"=\""; \
|
||||
+ buf += " " x"=\""; \
|
||||
buf += esc.utf8_str(); \
|
||||
buf += "\""; \
|
||||
}
|
||||
Index: plugins/latex/xp/ie_exp_LaTeX.cpp
|
||||
===================================================================
|
||||
--- plugins/latex/xp/ie_exp_LaTeX.cpp (revision 35181)
|
||||
+++ plugins/latex/xp/ie_exp_LaTeX.cpp (working copy)
|
||||
@@ -1330,7 +1330,7 @@
|
||||
m_pie->write(sBuf.c_str(),sBuf.size());
|
||||
}
|
||||
|
||||
-#define SUB(a,who) case a: subst = "\\(\\"who"\\)"; return true;
|
||||
+#define SUB(a,who) case a: subst = "\\(\\" who"\\)"; return true;
|
||||
#define SUBd(a,who) case a: subst = who; return true;
|
||||
static bool _convertLettersToSymbols(char c, const char *& subst)
|
||||
{
|
||||
Index: plugins/collab/backends/service/xp/soa_soup.cpp
|
||||
===================================================================
|
||||
--- plugins/collab/backends/service/xp/soa_soup.cpp (revision 35181)
|
||||
+++ plugins/collab/backends/service/xp/soa_soup.cpp (working copy)
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
static bool _invoke(const std::string& /*url*/, const soa::method_invocation& /*mi*/, SoaSoupSession& sess, std::string& result) {
|
||||
if (!sess.m_session || !sess.m_msg )
|
||||
- return soa::GenericPtr();
|
||||
+ return false;
|
||||
|
||||
guint status = soup_session_send_message (sess.m_session, sess.m_msg);
|
||||
if (!(SOUP_STATUS_IS_SUCCESSFUL (status) ||
|
||||
Index: plugins/collab/backends/service/xp/RealmProtocol.cpp
|
||||
===================================================================
|
||||
--- plugins/collab/backends/service/xp/RealmProtocol.cpp (revision 35181)
|
||||
+++ plugins/collab/backends/service/xp/RealmProtocol.cpp (working copy)
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#define MAX_PACKET_DATA_SIZE 64*1024*1024
|
||||
|
||||
-#define RPV1_PACKET_NONEXISTENT -2
|
||||
-#define RPV1_PACKET_VARIABLE -1
|
||||
+#define RPV1_PACKET_NONEXISTENT uint32_t(-2)
|
||||
+#define RPV1_PACKET_VARIABLE uint32_t(-1)
|
||||
|
||||
static uint32_t body_size[6] = {
|
||||
RPV1_PACKET_NONEXISTENT, /* 0: reserved */
|
23
abiword-3.0.1-gnutls.patch
Normal file
23
abiword-3.0.1-gnutls.patch
Normal file
@ -0,0 +1,23 @@
|
||||
Index: plugins/collab/backends/service/xp/tls_tunnel.cpp
|
||||
===================================================================
|
||||
--- plugins/collab/backends/service/xp/tls_tunnel.cpp (revision 35191)
|
||||
+++ plugins/collab/backends/service/xp/tls_tunnel.cpp (working copy)
|
||||
@@ -306,9 +306,6 @@
|
||||
disconnect_(transport_ptr, session_ptr, local_socket_ptr, remote_socket_ptr);
|
||||
}
|
||||
|
||||
-static const int PRIORITIES[] = { GNUTLS_KX_ANON_DH, GNUTLS_KX_RSA, GNUTLS_KX_DHE_DSS, GNUTLS_KX_DHE_RSA, 0 };
|
||||
-static const int CIPHERS[] = { GNUTLS_CIPHER_AES_256_CBC, GNUTLS_CIPHER_AES_128_CBC, GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR_128, 0 };
|
||||
-
|
||||
// FIXME: this clientproxy can only handle 1 SSL connection at the same time
|
||||
ClientProxy::ClientProxy(const std::string& connect_address, unsigned short connect_port,
|
||||
const std::string& ca_file, bool check_hostname)
|
||||
@@ -400,8 +397,6 @@
|
||||
// setup session
|
||||
return_val_if_neg(gnutls_init(session_ptr.get(), GNUTLS_CLIENT), session_ptr_t());
|
||||
return_val_if_neg(gnutls_set_default_priority(*session_ptr), session_ptr_t());
|
||||
- return_val_if_neg(gnutls_kx_set_priority(*session_ptr,PRIORITIES), session_ptr_t());
|
||||
- return_val_if_neg(gnutls_cipher_set_priority(*session_ptr,CIPHERS), session_ptr_t());
|
||||
return_val_if_neg(gnutls_credentials_set(*session_ptr, GNUTLS_CRD_CERTIFICATE, x509cred), session_ptr_t());
|
||||
|
||||
// setup transport
|
15
abiword.spec
15
abiword.spec
@ -6,7 +6,7 @@
|
||||
Summary: Word processing program
|
||||
Name: abiword
|
||||
Version: %{majorversion}.%{minorversion}.%{microversion}
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Epoch: 1
|
||||
Group: Applications/Editors
|
||||
License: GPLv2+
|
||||
@ -25,6 +25,9 @@ Patch4: abiword-3.0.0-link-grammar-5.patch
|
||||
Patch5: abiword-3.0.0-link-grammar-5-second.patch
|
||||
Patch6: abiword-3.0.0-libwp.patch
|
||||
Patch7: abiword-3.0.1-libwps-0.4.patch
|
||||
Patch8: abiword-3.0.1-gnutls.patch
|
||||
Patch9: abiword-3.0.1-gcc6.patch
|
||||
Patch10: abiword-3.0.1-fixwps.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -115,6 +118,9 @@ Python bindings for developing with libabiword
|
||||
%patch5 -p1 -b .link-grammar-5-second
|
||||
%patch6 -p1 -b .libwp
|
||||
%patch7 -p1 -b .libwps-0.4
|
||||
%patch8 -p0 -b .gnutls
|
||||
%patch9 -p0 -b .gcc6
|
||||
%patch10 -p1 -b .wps2
|
||||
|
||||
# setup abiword documentation
|
||||
%setup -q -T -b 1 -n abiword-docs-%{version}
|
||||
@ -124,8 +130,7 @@ Python bindings for developing with libabiword
|
||||
# build libabiword and abiword
|
||||
cd $RPM_BUILD_DIR/abiword-%{version}
|
||||
|
||||
aclocal -I.
|
||||
autoconf
|
||||
autoreconf -vif
|
||||
|
||||
%configure --enable-plugins --enable-clipart --enable-templates --enable-introspection
|
||||
# Build non SMP due to issues with gobject-introspection builds
|
||||
@ -252,6 +257,10 @@ fi
|
||||
%{python_sitearch}/*
|
||||
|
||||
%changelog
|
||||
* Sun Apr 10 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1:3.0.1-10
|
||||
- Add patches to fix building with newer gnutls and gcc6
|
||||
- Add patch to fix Wordperfect support
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.0.1-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user