Project import
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2a10755 --- /dev/null +++ b/Makefile
@@ -0,0 +1,125 @@ +# +# Copyright (c) 2010-2011 Nest, Inc. +# All rights reserved. +# +# This document is the property of Nest. It is considered +# confidential and proprietary information. +# +# This document may not be reproduced or transmitted in any form, +# in whole or in part, without the express written permission of +# Nest. +# +# Description: +# This file is the makefile for libedit, a BSD-licensed +# alternative to libreadline. +# + + +include pre.mak + +PackageName := libedit + +PackageExtension := tar.gz +PackageSeparator := - + +PackagePatchArgs := -p1 + +PackageArchive := $(PackageName).$(PackageExtension) +PackageSourceDir := $(PackageName)$(PackageSeparator)$(PackageVersion) + +PackageBuildMakefile = $(call GenerateBuildPaths,Makefile) + +CleanPaths += $(PackageLicenseFile) + +SOURCEDIRS = $(PackageSourceDir) +$(PackageSourceDir)_RULE_TARGET = $(BuildDirectory)/configure + +all: $(PackageDefaultGoal) + +# Generate the package license contents. + +$(PackageSourceDir)/COPYING: $(BuildDirectory)/source + +$(PackageLicenseFile): $(PackageSourceDir)/COPYING + $(copy-result) + +# Extract the source from the archive and apply patches, if any. + +$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths) + $(expand-and-patch-package) + +# Prepare the sources. + +$(BuildDirectory)/source: | $(PackageSourceDir) $(BuildDirectory) + $(Verbose)touch $@ + +# Patch the sources, if necessary. + +$(BuildDirectory)/patch: $(BuildDirectory)/source + $(Verbose)touch $@ + +# Generate the package build makefile. +# Configure the source for building. +# +# Avahi uses and, in fact, requires pkg-config to set-up LDFLAGS and +# CFLAGS for LIBDAEMON even though these are explicitly provided on +# the configure command line above as prescribed in the "how to +# configure WITHOUT pkg-config" instructions. +# +# Unfortunately, some site Linux systems are quite old and have a +# version of pkg-config that avahi refuses to work with. +# Consequently, we place $(HostBinDir) first in the path to ensure +# that the project-local version of pkg-config is detected and used +# rather than a host- or site-local version. + +$(BuildDirectory)/configure: PATH := $(HostBinDir):$(PATH) + +$(BuildDirectory)/configure: $(BuildDirectory)/source | $(PackageSourceDir) $(BuildDirectory) + $(Verbose)cd $(BuildDirectory) && \ + $(CURDIR)/$(PackageSourceDir)/configure \ + CC="$(CC) $(CPPOPTFLAGS)" CXX="$(CXX) $(CPPOPTFLAGS)" AR=$(AR) RANLIB=$(RANLIB) STRIP=$(STRIP) \ + INSTALL="$(INSTALL) $(INSTALLFLAGS)" \ + CPPFLAGS="$(call ToolGenerateIncludeArgument,$(NCursesIncludePath)) \ + $(call ToolGenerateIncludeArgument,$(LinuxIncludePath))" \ + LDFLAGS="$(call GenerateLibraryPathArgument,$(NCursesLibraryPath))" \ + --build=$(HostTuple) \ + --host=$(TargetTuple) \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static + $(Verbose)touch $@ + +# Build the source. + +$(BuildDirectory)/build: $(BuildDirectory)/configure + $(Verbose)$(MAKE) -C $(BuildDirectory) all + $(Verbose)touch $@ + +# Stage the build to a temporary installation area. + +$(BuildDirectory)/stage: $(BuildDirectory)/build | $(ResultDirectory) + $(Verbose)$(MAKE) -C $(BuildDirectory) DESTDIR=$(ResultDirectory) install + $(Verbose)-ln -s editline $(ResultDirectory)/usr/include/readline + $(Verbose)-ln -s ../histedit.h $(ResultDirectory)/usr/include/readline/history.h + $(Verbose)-ln -s libedit.so $(ResultDirectory)/usr/lib/libreadline.so + $(Verbose)-ln -s libedit.a $(ResultDirectory)/usr/lib/libreadline.a + $(Verbose)touch $@ + +.PHONY: stage +stage: $(BuildDirectory)/stage + + +DeviceUser:=root +quick-install: stage + $(Verbose)tar -czC $(ResultDirectory)/usr/ . | ssh $(DeviceUser)@$(DeviceAddress) tar xvzC /usr + +clean: + $(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir) + $(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory) + $(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory) + +include post.mak + + +
diff --git a/libedit.tar.gz b/libedit.tar.gz new file mode 100644 index 0000000..117c135 --- /dev/null +++ b/libedit.tar.gz Binary files differ
diff --git a/libedit.url b/libedit.url new file mode 100644 index 0000000..44ef949 --- /dev/null +++ b/libedit.url
@@ -0,0 +1 @@ +http://www.thrysoee.dk/editline/libedit-20130611-3.1.tar.gz
diff --git a/libedit.version b/libedit.version new file mode 100644 index 0000000..a458884 --- /dev/null +++ b/libedit.version
@@ -0,0 +1 @@ +20130611-3.1