Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[don't merge] Attempt at trying to get AbiWord to build via MXE #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ opt_pkgs=''
# gtk deps
cairo_req='cairo-pdf cairo-ps pangocairo'
#
gtk_req="gtk+-3.0 >= $GTK_VERSION_REQ gtk+-unix-print-3.0 librsvg-2.0 >= 2.32.0"
gtk_req="gtk+-3.0 >= $GTK_VERSION_REQ librsvg-2.0 >= 2.32.0"
dnl cairo-fc is needed but only available on cairo > 1.10
dnl http://bugzilla.abisource.com/show_bug.cgi?id=13265
PKG_CHECK_EXISTS(cairo >= 1.10, [gtk_req="$gtk_req cairo-fc"],[])
Expand Down Expand Up @@ -157,7 +157,7 @@ case ${host_os} in
;;
*mingw*)
PLATFORM="win"
TOOLKIT="win"
TOOLKIT="gtk"
;;
*)
PLATFORM="unix"
Expand Down Expand Up @@ -689,7 +689,7 @@ elif test "$TOOLKIT" = "qt"; then
else
SYSTEM_CFLAGS=$PNG_CFLAGS
SYSTEM_LIBS="$PNG_LIBS -ljpeg"
deps_pkgs="$deps_pkgs $gtk_pkgs x11"
deps_pkgs="$deps_pkgs $gtk_pkgs"
fi

PKG_CHECK_MODULES(DEPS,[$deps_pkgs])
Expand Down
49 changes: 49 additions & 0 deletions mxe/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
MXE is licensed under the MIT Licence. The makefiles and utilities under
`plugins/`, `src/`, and `tools/` all share this licence.

> Copyright (c) 2007-2016
>
> * Volker Diels-Grabsch
> * Mark Brand
> * Tony Theodore
> * Martin Gerhardy
> * Tiancheng "Timothy" Gu
> * Boris Nagaev
> * ... and many other [contributors][contributors]
>
> (contact via the [project mailing list][mailing-list] or
> [issue tracker][issue-tracker])
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.

MXE distributes code from the following projects in the `ext/` directory:

- [GNU config.guess][config.guess] [GPL3+ with Autoconf exception]
- [GNU Make Standard Library][gmsl] [BSD 3-clause]

The [packages][packages] downloaded by MXE (ending up in `pkg/`) each
have their own licence(s). Please see the individual source trees and/or
websites for further details.

[contributors]: https://github.com/mxe/mxe/graphs/contributors
[mailing-list]: https://lists.nongnu.org/mailman/listinfo/mingw-cross-env-list
[issue-tracker]: https://github.com/mxe/mxe/issues
[config.guess]: https://github.com/mxe/mxe/blob/master/ext/config.guess#L3-L27
[gmsl]: https://github.com/mxe/mxe/blob/master/ext/gmsl#L8-L40
[packages]: https://mxe.cc/#packages
8 changes: 8 additions & 0 deletions mxe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
You WILL need additional work to make this go.

make MXE_PLUGIN_DIRS=plugins/apps/abiword abiword

notes:

* need to remove the manpages to get Enchant to build
* need to remove the -Werror flags to get libgoffice to build
14 changes: 14 additions & 0 deletions mxe/abiword.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is part of MXE. See LICENSE.md for licensing information.

# TOOLKIT target for windows must be forced to GTK

PKG := abiword
$(PKG)_DEPS := cc libgsf libxslt enchant wv goffice

define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '/media/modus/External2/abiword/abiword/configure' \
$(MXE_CONFIGURE_OPTS) \
--infodir='$(BUILD_DIR)/sink'
$(MAKE) -C $(BUILD_DIR) -j '$(JOBS)'
$(MAKE) -C $(BUILD_DIR) -j 1 install $(MXE_DISABLE_DOCS)
endef
14 changes: 14 additions & 0 deletions mxe/enchant.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is part of MXE. See LICENSE.md for licensing information.

# need to remove the manpages to get this to work!

PKG := enchant
$(PKG)_DEPS := cc

define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '/media/modus/External2/abiword/enchant/configure' \
$(MXE_CONFIGURE_OPTS) \
--infodir='$(BUILD_DIR)/sink'
$(MAKE) -C $(BUILD_DIR) -j '$(JOBS)'
$(MAKE) -C $(BUILD_DIR) -j 1 install $(MXE_DISABLE_DOCS)
endef
14 changes: 14 additions & 0 deletions mxe/goffice.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is part of MXE. See LICENSE.md for licensing information.

# need to remove the -Werror flags to get this to work

PKG := goffice
$(PKG)_DEPS := cc libgsf librsvg

define $(PKG)_BUILD
cd '$(BUILD_DIR)' && PKG_CONFIG=/media/modus/External2/mxe/usr/bin/i686-w64-mingw32.static-pkg-config '/media/modus/External2/abiword/goffice-0.10.55/configure' \
$(MXE_CONFIGURE_OPTS) \
--infodir='$(BUILD_DIR)/sink'
$(MAKE) -C $(BUILD_DIR) -j '$(JOBS)'
$(MAKE) -C $(BUILD_DIR) -j 1 install $(MXE_DISABLE_DOCS)
endef
12 changes: 12 additions & 0 deletions mxe/wv.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is part of MXE. See LICENSE.md for licensing information.

PKG := wv
$(PKG)_DEPS := cc libgsf

define $(PKG)_BUILD
cd '$(BUILD_DIR)' && PKG_CONFIG=/media/modus/External2/mxe/usr/bin/i686-w64-mingw32.static-pkg-config '/media/modus/External2/abiword/wv/configure' \
$(MXE_CONFIGURE_OPTS) \
--infodir='$(BUILD_DIR)/sink'
$(MAKE) -C $(BUILD_DIR) -j '$(JOBS)'
$(MAKE) -C $(BUILD_DIR) -j 1 install $(MXE_DISABLE_DOCS)
endef
1 change: 1 addition & 0 deletions src/af/ev/win/ev_Win32Menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <windows.h>
#include "ut_types.h"
#include "ut_vector.h"
#include "xap_Types.h"
#include "ev_Menu.h"
#include "ut_color.h"
Expand Down
2 changes: 2 additions & 0 deletions src/af/ev/win/ev_Win32Toolbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "ut_types.h"
#include "ut_vector.h"
#include "ut_misc.h"
#include "ut_assert.h"
#include "xap_Types.h"
#include "ev_Toolbar.h"
#include "xav_Listener.h"
Expand Down
4 changes: 0 additions & 4 deletions src/af/util/unix/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ AM_CPPFLAGS = \

libunix_la_SOURCES = \
ut_debugmsg.cpp \
ut_files.cpp \
ut_files.h \
ut_mutexImpl.h \
ut_path.cpp \
ut_sleep.h \
Expand All @@ -16,8 +14,6 @@ libunix_la_SOURCES = \
ut_unixIdle.cpp \
ut_unixIdle.h \
ut_unixMisc.cpp \
ut_unixColor.cpp \
ut_unixColor.h \
ut_unixTimer.cpp \
ut_unixTimer.h

1 change: 0 additions & 1 deletion src/af/util/win/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ libwin_la_SOURCES = \
ut_Win32Misc.cpp \
ut_Win32OS.cpp \
ut_Win32OS.h \
ut_Win32String.cpp \
ut_Win32Timer.cpp \
ut_Win32Timer.h \
ut_Win32Uuid.cpp \
Expand Down
89 changes: 0 additions & 89 deletions src/af/util/win/ut_Win32String.cpp

This file was deleted.

4 changes: 4 additions & 0 deletions src/af/util/win/ut_debugmsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@

#include "ut_debugmsg.h"

void UT_Debug_Init()
{
}

// TODO This is Win32-specific, and should not be.

void _UT_OutputMessage(const char *s, ...)
Expand Down
4 changes: 4 additions & 0 deletions src/af/util/xp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ libxp_la_SOURCES = \
ut_endian.h \
ut_exception.h \
ut_export.h \
ut_files.cpp \
ut_files.h \
ut_go_file.cpp \
ut_go_file.h \
ut_growbuf.cpp \
Expand Down Expand Up @@ -96,6 +98,8 @@ libxp_la_SOURCES = \
ut_unicode.h \
ut_units.cpp \
ut_units.h \
ut_unixColor.cpp \
ut_unixColor.h \
ut_uuid.cpp \
ut_uuid.h \
ut_vector.h \
Expand Down
6 changes: 6 additions & 0 deletions src/af/util/unix/ut_files.cpp → src/af/util/xp/ut_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ bool UT_createDirectoryIfNecessary(const char * szDir, bool publicdir)

bool success = true;
mode_t old_mask = umask (0);
#ifdef _WIN32
// glib almost certainly has a better way to do this
// but let's put out the fires first, no?
if (mkdir (szDir))
#else
if (mkdir (szDir, publicdir ? 0775 : 0700))
#endif
{
UT_DEBUGMSG(("Could not create Directory [%s].\n", szDir));
success = false;
Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions src/af/util/xp/ut_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1692,8 +1692,6 @@ const char* std_size_string(float f)
return string;
}

#ifndef TOOLKIT_WIN

UT_BidiCharType UT_bidiGetCharType(UT_UCS4Char c)
{
#ifndef NO_BIDI_SUPPORT
Expand Down Expand Up @@ -1798,5 +1796,3 @@ bool UT_bidiGetMirrorChar(UT_UCS4Char c, UT_UCS4Char &mc)
#endif
}


#endif
3 changes: 3 additions & 0 deletions src/af/util/xp/ut_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,16 @@ ABI_EXPORT char *UT_strptime (const char *buf, const char *format, struct tm *tm
#endif


#if 0
/* This code breaks boost */
#ifdef _WIN32
#define snprintf _snprintf

#define _(String) (String)
#define N_(String) (String)

#endif /* WIN32 */
#endif

#if defined (SNPRINTF_MISSING)
extern int snprintf(char *str, size_t size, const char *format, ...);
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions src/af/xap/gtk/xap_UnixAppImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

#include "xap_UnixAppImpl.h"
#include "ut_string_class.h"
#ifndef _WIN32
#include "ut_files.h"
#endif
#include "ut_go_file.h"

std::string XAP_UnixAppImpl::localizeHelpUrl(const char * pathBefore,
Expand All @@ -42,7 +44,9 @@ bool XAP_UnixAppImpl::openHelpURL(const char * url)
bool XAP_UnixAppImpl::openURL(const char * url)
{
// Need this to make AbiGimp Load!!!!!
#ifndef _WIN32
if (progExists("foo")) {}
#endif

GError * err = nullptr;
err = UT_go_url_show (url);
Expand Down
1 change: 0 additions & 1 deletion src/af/xap/gtk/xap_UnixFrameImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include "ut_string.h"
#include "ut_types.h"
#include "ut_assert.h"
#include "ut_files.h"
#include "ut_misc.h"
#include "ut_sleep.h"
#include "xap_ViewListener.h"
Expand Down
Loading