Great Free software on your Mac is by using MacPorts.
To install GIMP using MacPorts, you simply do
sudo port install gimp
once you have MacPorts installed.

GIMP libxpm problem

:PROBLEM: The official GIMP 2.8.22 Native Build が xpm を読めません。libxpm がないってかんじ。

:CONCLUSION: MacPorts GIMP 2.8.22 XQuartz Build なら xpm 読めます。

GIMP を MacPorts で入れてみる。

https://www.gimp.org/downloads/
% sudo port install gimp
Password:
--->  Computing dependencies for gimp
The following dependencies will be installed: 
 XviD
 aalib
 atk
 autoconf-archive
 babl
 cfitsio
 ctags
 cython_select
 dbus-glib
 dcraw
 exiv2
 ffmpeg
 fribidi
 gegl
 gimp-app
 gimp-jp2
 gimp-lqr-plugin
 gimp2
 gnome-common
 gtk-doc
 gtk2
 gtkimageview
 gutenprint
 hicolor-icon-theme
 intltool
 iso-codes
 itstool
 lame
 lensfun
 libass
 libbluray
 libexif
 libglade2
 liblqr
 libmodplug
 libopenraw
 libopus
 libsdl2
 libspiro
 libtheora
 libusb
 libusb-compat
 libwmf
 net-snmp
 nosetests_select
 openjade
 opensp
 orc
 p5.24-getopt-long
 p5.24-pathtools
 p5.24-scalar-list-utils
 p5.24-xml-parser
 py27-cairo
 py27-cython
 py27-gobject
 py27-libxml2
 py27-nose
 py27-numpy
 py27-pygtk
 python36
 python3_select
 sane-backends
 schroedinger
 source-highlight
 soxr
 speex
 ufraw
 x264
 x265
 xorg-compositeproto
 xorg-libXcomposite
 xorg-libXcursor
 xorg-libXinerama
 xorg-xineramaproto
 xsane
Continue? [Y/n]: y
...
--->  Building gimp
--->  Staging gimp into destroot
--->  Installing gimp @2.8.22_0
--->  Activating gimp @2.8.22_0
--->  Cleaning gimp
--->  Updating database of binaries
--->  Scanning binaries for linking errors               
--->  No broken files found.                             
--->  Some of the ports you installed have notes:
  ffmpeg has the following notes:
    *******
    ******* This build of ffmpeg includes GPLed code and
    ******* is therefore licensed under GPL v2 or later.
    *******
    ******* The following modules are GPLed:
    *******
    *******      postproc
    *******      libx264
    *******      libx265
    *******      libxvid
    *******
    ******* To include all nonfree, GPLed and LGPL code use variant +nonfree.
    ******* To remove nonfree and GPLed code leaving only LGPL code remove the
    ******* +gpl2 variant.
    *******
  py27-cython has the following notes:
    To make the Python 2.7 version of Cython the one that is run when you
    execute the commands without a version suffix, e.g. 'cython', run:
    
    port select --set cython cython27
  python36 has the following notes:
    To make this the default Python or Python 3 (i.e., the version run by the
    'python' or 'python3' commands), run one or both of:
    
        sudo port select --set python python36
        sudo port select --set python3 python36
    
    ##############################################################
    # IF YOU ARE USING PYTHON FROM THE TERMINAL, PLEASE INSTALL:
    #   py36-readline
    # TO AVOID A LIBEDIT / PYTHON INTERACTION ISSUE.
    # REF:https://trac.macports.org/ticket/48807

    ##############################################################
  sane-backends has the following notes:
    Edit /opt/local/etc/sane.d/dll.conf to enable only specific backends for a
    noticeable performance gain.

シンプルにいくと XQuartz 版がビルドされました。Native 版をビルドするには工夫が要りそうです。 システムに XQuartz が見つかると XQuartz 版でビルドするのがデフォルト。 twm で動いてる GIMP もオツなもんですょ。twm を見ると甘酸っぱい気持ちが蘇ります。FreeBSD 2 で unix を始めたあの頃、(以下略)。 GIMP 2.8.22 MacPorts XQuartz Build Version では xpm ファイルが読めました。

XPM を PBM に変換するには

You can convert XPM to PBM 
with GIMP or ImageMagick.

GIMP:
  File > Open... file.xpm
  Image > Mode > Indexed
  File > Export as... file.pbm

Alternatively,
run 'convert' from ImageMagick.

Terminal:
  % convert file.xpm file.pbm

なんのために xpm を pbm に変換する作業なんかやっているの?
Emacs の ToolBar に使うアイコンを作るため、だけです。

topic: macosx
first posted: 2017-09-08 12:49:20
last modified: 2017-09-08 14:12:20