Commit 40d54a282095717538b722ca43d124d5a3f46389

Authored by Perry Werneck
Committed by GitHub
2 parents b5e39922 67744d2d
Exists in master and in 2 other branches develop, macos

Merge pull request #28 from PerryWerneck/macos

Enabling 'jhbuild'
Showing 3 changed files with 70 additions and 25 deletions   Show diff stats
@@ -136,8 +136,11 @@ Windows native with MSYS2 @@ -136,8 +136,11 @@ Windows native with MSYS2
136 make install 136 make install
137 ``` 137 ```
138 138
139 -Building for macOS (using homebrew)  
140 -=================================== 139 +Building for macOS
  140 +==================
  141 +
  142 +Using homebrew
  143 +--------------
141 144
142 1. Install [homebrew](https://brew.sh/) 145 1. Install [homebrew](https://brew.sh/)
143 146
@@ -158,15 +161,27 @@ Building for macOS (using homebrew) @@ -158,15 +161,27 @@ Building for macOS (using homebrew)
158 ```shell 161 ```shell
159 ./autogen.sh --prefix="$(brew --cellar)/lib3270/5.4" 162 ./autogen.sh --prefix="$(brew --cellar)/lib3270/5.4"
160 make all && make install 163 make all && make install
161 - $ brew link lib3270 164 + brew link lib3270
162 ``` 165 ```
163 166
164 -Uninstalling  
165 -------------  
166 -  
167 -1. To uninstall 167 +To uninstall
168 168
169 ```shell 169 ```shell
170 brew unlink lib3270 170 brew unlink lib3270
171 rm -fr "$(brew --cellar)/lib3270" 171 rm -fr "$(brew --cellar)/lib3270"
172 ``` 172 ```
  173 +
  174 +Using jhbuild
  175 +--------------
  176 +
  177 +1. Install jhbuild
  178 +
  179 + https://wiki.gnome.org/Projects/GTK/OSX/Building
  180 +
  181 +2. build
  182 +
  183 + ```shell
  184 + jhbuild --moduleset=https://raw.githubusercontent.com/PerryWerneck/lib3270/macos/mac/lib3270.modules build lib3270
  185 + ```
  186 +
  187 +
@@ -126,7 +126,7 @@ case "$host" in @@ -126,7 +126,7 @@ case "$host" in
126 DLLEXT=".dylib" 126 DLLEXT=".dylib"
127 DLL_LDFLAGS="-shared -Wl,-install_name,\$(@F)" 127 DLL_LDFLAGS="-shared -Wl,-install_name,\$(@F)"
128 128
129 - INSTALL_PACKAGES="linux-lib ${INSTALL_PACKAGES}" 129 + INSTALL_PACKAGES="macos-lib ${INSTALL_PACKAGES}"
130 130
131 app_cv_static='no' 131 app_cv_static='no'
132 132
@@ -641,25 +641,35 @@ dnl --------------------------------------------------------------------------- @@ -641,25 +641,35 @@ dnl ---------------------------------------------------------------------------
641 dnl Check for CURL 641 dnl Check for CURL
642 dnl --------------------------------------------------------------------------- 642 dnl ---------------------------------------------------------------------------
643 643
644 -AC_ARG_ENABLE([curl],  
645 - AS_HELP_STRING([--disable-curl],[Disable use of libcurl]),  
646 - [case "${enableval}" in  
647 - yes) have_curl=yes ;;  
648 - no) have_curl=no ;;  
649 - *) AC_MSG_ERROR(bad value ${enableval} for --disable-curl);;  
650 - esac],  
651 - [case "$host" in  
652 - *-mingw32|*-pc-msys) have_curl=no ;;  
653 - *) have_curl=yes;;  
654 - esac])  
655 - 644 +case "$host" in
656 645
657 -if test "x${have_curl}" != xno ; then  
658 - PKG_CHECK_MODULES( [LIBCURL], [libcurl], AC_DEFINE(HAVE_LIBCURL,[],[Do we have libcurl?]), AC_MSG_ERROR([libcurl not present.]) )  
659 -fi 646 + *-mingw32|*-pc-msys)
  647 + AC_SUBST(LIBCURL_LIBS)
  648 + AC_SUBST(LIBCURL_CFLAGS)
  649 + ;;
660 650
661 -AC_SUBST(LIBCURL_LIBS)  
662 -AC_SUBST(LIBCURL_CFLAGS) 651 + *-apple-darwin*)
  652 + AC_PATH_TOOL([CURLCONFIG], [curl-config], [no])
  653 +
  654 + if test x$CURLCONFIG = xno; then
  655 + AC_MSG_NOTICE([Building without CURL support])
  656 + AC_SUBST(LIBCURL_CFLAGS)
  657 + AC_SUBST(LIBCURL_LIBS)
  658 + else
  659 + AC_MSG_NOTICE([Using $($CURLCONFIG --version)])
  660 + AC_DEFINE(HAVE_LIBCURL,[],[Do we have libcurl?])
  661 + AC_SUBST(LIBCURL_CFLAGS,"$($CURLCONFIG --cflags)")
  662 + AC_SUBST(LIBCURL_LIBS,"$($CURLCONFIG --libs)")
  663 + fi
  664 + ;;
  665 +
  666 + *)
  667 + PKG_CHECK_MODULES( [LIBCURL], [libcurl], AC_DEFINE(HAVE_LIBCURL,[],[Do we have libcurl?]), AC_MSG_ERROR([libcurl not present.]) )
  668 + AC_SUBST(LIBCURL_CFLAGS)
  669 + AC_SUBST(LIBCURL_LIBS)
  670 + ;;
  671 +
  672 +esac
663 673
664 dnl --------------------------------------------------------------------------- 674 dnl ---------------------------------------------------------------------------
665 dnl Directory config 675 dnl Directory config
mac/lib3270.modules 0 → 100644
@@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
  1 +<?xml version="1.0"?>
  2 +<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
  3 +<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
  4 +<moduleset>
  5 +
  6 + <!-- include href="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/modulesets-stable/gtk-osx.modules"/ -->
  7 + <include href="https://gitlab.gnome.org/GNOME/jhbuild/raw/master/modulesets/gnome-sysdeps-latest.modules" />
  8 +
  9 + <repository type="git" name="github.com" href="git://github.com/"/>
  10 +
  11 + <autotools id="lib3270">
  12 + <branch repo="github.com" module="PerryWerneck/lib3270" revision="macos" />
  13 +
  14 + <dependencies>
  15 + <dep package="openssl"/>
  16 + </dependencies>
  17 + </autotools>
  18 +
  19 +</moduleset>
  20 +