Re: CMake build with MacPorts on macOS

[email protected]
Newsgroups gmane.editors.texmacs.devel
Message-ID <[email protected]>
Thanks a lot.


I made a Portfile for MacPorts to install a development version of TeXmacs.
(commit 490433a4329e7ae2f7ef61c63aec80faab123659)

I made a patch file for TeXmacs to be able to use a development version of Maxima.
(patch-plugins-maxima-bin-maxima_detect.diff)
 
(0) install MacPorts if you don't have it.
    See: https://www.macports.org/install.php

(1) download "Portfile" and "patch-plugins-maxima-bin-maxima_detect.diff" attached to this mail.

(2) install a development version of TeXmacs as follows:
$ cd $(port dir texmacs)
$ sudo cp -i ${HOME}/Downloads/patch-plugins-maxima-bin-maxima_detect.diff ./files/
$ sudo mv -i ./Portfile ./Portfile.orig
$ sudo cp -i ${HOME}/Downloads/Portfile ./
$ cd ../..
$ sudo portindex
$ cd $HOME
$ port info texmacs-devel
$ sudo port install texmacs-devel

(3) launch TeXmacs:
$ open -a /Applications/MacPorts/TeXmacs.app


Thanks,
Tomio Arisaka



> 2019/04/19 23:18, Darcy Shen <[email protected]> wrote:
> 
> see below.
> 
> On 2019/3/14 10:07 下午, [email protected] wrote:
>> Hello,
>> 
>> This mail shows how to make TeXmacs.app on macOS.
>> (My macOS is El-Capitan)
>> 
>> I have tried to compile a github version of TeXmacs with cmake.
>> I'm using MacPorts, so all dependencies are installed with MacPorts.
>> (MacPorts is a system for compiling, installing, and managing open source software)
>> <https://www.macports.org/>
>> 
>> ########################################
>> # Build dependency
>> sudo port install cmake
>> # Library dependencies
>> sudo port install guile18
>> sudo port install qt4-mac
>> # Runtime dependency
>> sudo port install ghostscript
>> 
>> git clone https://github.com/texmacs/texmacs.git texmacs
>> 
>> cd ./texmacs
>> 
>> mkdir ./build && cd ./build
>> 
>> cmake -DGUILECONFIG_EXECUTABLE=/opt/local/bin/guile18-config -DQT_QMAKE_EXECUTABLE=/opt/local/libexec/qt4/bin/qmake -DCMAKE_INSTALL_PREFIX=./TeXmacs.app/Contents/Resources ..
>> 
>> # Apply the next patch in order to avoid an error.
>> #
>> perl -pi -e 's|#endif // defined TM_CONFIGURE_H|#define GUILE_HEADER_18 1\n\n$&|' ./src/System/tm_configure.hpp
>> 
>> make -j8
>> 
>> make install
>> 
>> # Execute the following commands in order to make an application-bundle.
>> #
>> cp -iRp ../src/Plugins/Cocoa/English.lproj ./TeXmacs.app/Contents/Resources/
>> cp -ip ../packages/macos/TeXmacs.icns ./TeXmacs.app/Contents/Resources/
>> cp -ip ../packages/macos/TeXmacs-document.icns ./TeXmacs.app/Contents/Resources/
>> cp -ip ../packages/macos/PkgInfo ./TeXmacs.app/Contents/
>> cp -fp ../packages/macos/Info.plist.in ./TeXmacs.app/Contents/Info.plist
>> perl -pi -e 's/\@DEVEL_VERSION\@/1.99.9/g' ./TeXmacs.app/Contents/Info.plist
>> perl -pi -e 's/\@SVNREV\@//g' ./TeXmacs.app/Contents/Info.plist
>> ########################################
> 
> 
> The 5 `cp`s and 2 `perl`s are no longer needed. I've updated the CMake build definitions.
> 
> 
>> 
>> I think this shell-script is useful for checking the current version of TeXmacs.
>> 
>> Thanks,
>> Tomio Arisaka

_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev
Portfile (application/octet-stream, 3.4 KB) - not displayed
patch-plugins-maxima-bin-maxima_detect.diff (application/octet-stream, 643 B)
--- plugins/maxima/bin/maxima_detect.orig	2019-03-16 23:39:05.000000000 +0900
+++ plugins/maxima/bin/maxima_detect	2019-03-18 00:22:53.000000000 +0900
@@ -23,8 +23,8 @@
     else
       echo '('
       maxima --list-avail |\
-        grep '^version [A-Za-z0-9\.][A-Za-z0-9\.]*, lisp [A-Za-z0-9][A-Za-z0-9]*$' |\
-        sed -e 's/^version \([A-Za-z0-9\.][A-Za-z0-9\.]*\), lisp \([A-Za-z0-9][A-Za-z0-9]*\)$/"\1 \2"/'
+        grep '^version [A-Za-z0-9_\.][A-Za-z0-9_\.]*, lisp [A-Za-z0-9][A-Za-z0-9]*$' |\
+        sed -e 's/^version \([A-Za-z0-9_\.][A-Za-z0-9_\.]*\), lisp \([A-Za-z0-9][A-Za-z0-9]*\)$/"\1 \2"/'
       echo ')'
     fi
   fi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.