• Stars
    star
    359
  • Rank 118,537 (Top 3 %)
  • Language Rez
  • License
    GNU General Publi...
  • Created over 13 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build scripts for www.emacsformacosx.com

Emacs Build Scripts

These are the emacs build scripts that produces the builds at http://emacsformacosx.com/.

Prerequisites

Hardware Requirements

The scripts are modular and are designed to be run on multiple build machines (or VMs) and integrate with continuous integration servers (the builds on emacsformacosx.com run from Jenkins now). This means that you can build whatever architectures you have access to.

Note that cross-compiling Emacs is (still) not possible due to the "unexec" step, which requires the binary that was built to be run. So if you want to build an old architecture (like PowerPC), you need to be running on a system that can actually execute binaries of that architecture.

XZ

Recent Emacs pretests are being distributed in .tar.xz format. The "fetch-emacs-from-ftp" script will convert from .xz to .tar.bz2 so that XZ doesn't need to be installed on every build machine. But you will need the "xz" program on the machines that runs "fetch-emacs-from-ftp". The easiest way to get it is through homebrew: "brew install xz"

XCode Command Line Tools

Building emacs requires that the XCode command line tools be installed so that some libraries (libxml2, at least) are available.

xcode-select --install

Currently, Homebrew installs a pkg-config definition for the built in libxml2, but uses deprecated paths that don't exist by default on newer MacOS versions (10.14 at least). The symptom is this error:

  CC       xml.o
xml.c:26:10: fatal error: 'libxml/tree.h' file not found
#include <libxml/tree.h>
         ^~~~~~~~~~~~~~~
1 error generated.

To fix it, run this:

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Usage

There are 3 scripts that are designed to be run from some sort of Continuous Integration software (the builds on http://emacsformacosx.com run from Jenkins). All three scripts know the --verbose command, and are nice and loud when it is given.

fetch-emacs-from-ftp

This takes an ftp url (ftp://ftp.gnu.org/gnu/emacs/, for example), and downloads the latest version of the Emacs source code found there. It will also convert the source from a .tar.xz to a .tar.bz2 (so that the main build VMs don't need to have "XZ" installed).

build-emacs-from-tar

This is the main build script. It takes a tar file and a "kind" (pretest, nightly, or release) as input and unpacks the tar, builds it for a single architecture, and tars up the resulting Emacs.app file.

You can tell it to build an architecture other than the default with the --arch option (--arch=powerpc or --arch=i386).

Builds of the main Emacs source repository are expected to be packaged up into tars elsewhere. http://emacsformacosx.com has a Jenkins job that pulls down the latest code and then tars it up like so:

DATE=$(date "+%Y-%m-%d_%H-%M-%S")
SHORT=$(git rev-parse --short HEAD)
DIR=emacs-$DATE-$SHORT
git archive --prefix="$DIR/" HEAD | tar x
(cd $DIR && ./autogen.sh)
tar cjf $DIR.tar.bz2 $DIR

combine-and-package

This takes multiple tar files as input, unpacks and combines them into a final "fat" Emacs.app, then creates a final disk image (.dmg). It takes an optional --sign parameter (--sign="my identity") which makes it code sign the Emacs.app.

Example

$ ./fetch-emacs-from-ftp -v ftp://ftp.gnu.org/pub/gnu/emacs
+ curl --continue-at - --silent -O ftp://ftp.gnu.org/pub/gnu/emacs/emacs-25.1.tar.xz
shell(#<Th:0x007febed8a48b0>): /usr/local//brew//bin/xzcat emacs-25.1.tar.xz
shell(#<Th:0x007febed8a48b0>): /usr/bin/bzip2
$ ls *.bz2
emacs-25.1.tar.bz2
$ ./build-emacs-from-tar -v -j 8 emacs-25.1.tar.bz2 release
  ... Lots out output snipped ...
Built Emacs-25.1-10.12-x86_64.tar.bz2, Emacs-25.1-10.12-x86_64-extra-source.tar
$ ./combine-and-package -v Emacs-25.1-10.12-x86_64.tar.bz2
  ... More output snipped ...
created: Emacs-25.1-universal.dmg

License

Copyright © 2004-2021 David Caldwell [email protected]

The scripts and programs contained in this distribution are licensed under the GNU General Public License (v3.0). See the LICENSE file for details.

More Repositories

1

renderjson

Render JSON into collapsible HTML
JavaScript
412
star
2

commit-patch

Commit patches to Darcs, Git, Mercurial, Bazaar, Monotone, Subversion, or CVS
Perl
21
star
3

gdisk

GUID disk partition editor
C
18
star
4

calmer-forest-theme

Darkish theme for Emacs with green & orange tint
Emacs Lisp
17
star
5

daemon-manager

Manage Daemons run and controlled by non root users
C++
15
star
6

pdp11dasm

PDP-11 Disassembler
C
13
star
7

libanalogtv

Analog TV simulation for Apple 2 emulators
C
10
star
8

JSML

Javascript object to DOM translator
HTML
10
star
9

patchutils

Patchutils is a small collection of programs that operate on patch files.
C
7
star
10

stm.js

ServeToMe clone written in Javascript/Node
JavaScript
7
star
11

http-log-to-statsd

Gather stats from custom apache/nginx logs and push them to statsd
Rust
6
star
12

Saver-View

A fork of Brian Nenninger's SaverLab, an excellent Mac OS X screensaver utility
Objective-C
4
star
13

jenkins-sparkle-appcast-plugin

Jenkins plugin to create Sparkle Appcasts.
Ruby
3
star
14

Time-Monotonic

Perl interface to monotonically increasing clocks
C++
3
star
15

cyrus-imsp-server

The IMSP server is used for storing application preferences and address book data in a shared location.
Perl
2
star
16

erscom

Elden Ring Seamless CoOp Manager
Rust
2
star
17

dterm

Multiuser serial port to telnet bridge
Ruby
2
star
18

pc

A Nifty Perl Calculator
Perl
2
star
19

electro

Static site generator
Perl
2
star
20

cert

Simple LetsEncrypt client
Ruby
2
star
21

File-Slurp-Unicode

Reading/Writing of Complete Files with Character Encoding Support
Perl
2
star
22

eol

Change line endings between mac, dos and unix
C
1
star
23

whatsmyip

Quicky HTTP server that just gives back the requester's IP address.
Rust
1
star
24

verbose-shell

sh -x like logging of Ruby's FileUtils functions
Ruby
1
star
25

libre-hardware-monitor-to-telegraf

Convert Libre Hardware Monitor's web API JSON into something more palatable to Telegraf
Go
1
star
26

pdpfs

Manipulate RT-11 Filesystems on disk images
Rust
1
star
27

apt-transport-s3-rust

Rust
1
star