readline-6.2.tar.gz
readline.*
libffi.*
+libuv.*
build.*
Cycript.ios
Cycript.osx
path = readline
url = git://git.savannah.gnu.org/readline.git
ignore = dirty
+[submodule "libuv"]
+ path = libuv
+ url = https://github.com/joyent/libuv.git
lib_LTLIBRARIES += libcycript.la
libcycript_la_LDFLAGS = $(CY_LDFLAGS)
-libcycript_la_LIBADD = $(LTLIBFFI) $(LTLIBGCC) -ldl
+libcycript_la_LIBADD = $(LTLIBUV) $(LTLIBFFI) $(LTLIBGCC) -ldl
libcycript_la_SOURCES = ConvertUTF.c Decode.cpp Driver.cpp Highlight.cpp Library.cpp Network.cpp Output.cpp Replace.cpp Syntax.cpp
libcycript_la_SOURCES += Parser.cpp Scanner.cpp
@CY_JAVA_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
@CY_OBJECTIVEC_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
libcycript_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_4)
am__libcycript_la_SOURCES_DIST = ConvertUTF.c Decode.cpp Driver.cpp \
Highlight.cpp Library.cpp Network.cpp Output.cpp Replace.cpp \
Syntax.cpp Parser.cpp Scanner.cpp Complete.cpp \
LTLIBOBJS = @LTLIBOBJS@
LTLIBREADLINE = @LTLIBREADLINE@
LTLIBTERMCAP = @LTLIBTERMCAP@
+LTLIBUV = @LTLIBUV@
LTOBJECTIVEC = @LTOBJECTIVEC@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
CY_LDFLAGS = -no-undefined -avoid-version -export-dynamic
lib_LTLIBRARIES = libcycript.la
libcycript_la_LDFLAGS = $(CY_LDFLAGS)
-libcycript_la_LIBADD = $(LTLIBFFI) $(LTLIBGCC) -ldl $(am__append_3) \
- $(am__append_9) $(am__append_12)
+libcycript_la_LIBADD = $(LTLIBUV) $(LTLIBFFI) $(LTLIBGCC) -ldl \
+ $(am__append_3) $(am__append_9) $(am__append_12)
libcycript_la_SOURCES = ConvertUTF.c Decode.cpp Driver.cpp \
Highlight.cpp Library.cpp Network.cpp Output.cpp Replace.cpp \
Syntax.cpp Parser.cpp Scanner.cpp $(am__append_1) \
cd "${0%%/*}"
-if [[ ! -e readline.osx/libreadline.a ]]; then
- ./apple-readline.sh; fi
-if [[ ! -e libffi.a ]]; then
- ./libffi.sh; fi
-
if ! which aclocal; then
touch aclocal.m4; fi
if ! which autoconf; then
touch config.h.in; fi
flags=("$@")
+ccf=(-g0 -O3)
function path() {
xcodebuild -sdk "$1" -version Path
function configure() {
local dir=$1
local sdk=$2
- local flg=$3
- shift 3
+ local arc=$3
+ local min=$4
+ local ffi=$5
+ local cpf=$6
+ local ldf=$7
+ local obc=$8
+ shift 8
+
+ set -- "$@" --enable-static --with-pic
cc=$(xcrun --sdk "${sdk}" -f clang)
cxx=$(xcrun --sdk "${sdk}" -f clang++)
+
+ flg="-arch ${arc} ${min}"
flg+=" -isysroot $(path "${sdk}")"
rm -rf build."${dir}"
mkdir build."${dir}"
cd build."${dir}"
- CC="${cc} ${flg}" CXX="${cxx} ${flg}" OBJCXX="${cxx} ${flg}" \
- ../configure --enable-maintainer-mode "${flags[@]}" --prefix="/usr" "$@"
+ if "${ffi}"; then
+ cpf+=" -I../libffi.${arch}/include"
+ ldf+=" -L../libffi.${arch}/.libs"
+ fi
- cd ..
-}
+ cpf+=" -I../libuv/include"
+ ldf+=" -L../libuv.${arch}/.libs"
-function build() {
- local dir=$1
- local sdk=$2
- local flg=$3
- shift 3
+ ../configure --enable-maintainer-mode "${flags[@]}" --prefix="/usr" "$@" \
+ CC="${cc} ${flg}" CXX="${cxx} ${flg}" OBJCXX="${cxx} ${flg}" \
+ CFLAGS="${ccf[*]}" CXXFLAGS="${ccf[*]}" OBJCXXFLAGS="${ccf[*]} ${obc}" \
+ CPPFLAGS="${cpf}" LDFLAGS="${ldf}"
- configure "${dir}" "${sdk}" "${flg}" "$@" --enable-static --with-pic
+ cd ..
}
-gof=(-g0 -O3)
-
for arch in i386 x86_64; do
- build "osx-${arch}" "${mac}" "-arch ${arch} -mmacosx-version-min=10.6" \
- CFLAGS="${gof[*]}" CXXFLAGS="${gof[*]}" OBJCXXFLAGS="${gof[*]}" \
- CPPFLAGS="-I../readline.osx" LDFLAGS="-L../readline.osx"
+ configure "osx-${arch}" "${mac}" "${arch}" "-mmacosx-version-min=10.6" \
+ false "-I../readline.osx" "-L../readline.osx" ""
done
for arch in i386 x86_64; do
- build "sim-${arch}" iphonesimulator "-arch ${arch} -mios-simulator-version-min=4.0" \
- CFLAGS="${gof[*]}" CXXFLAGS="${gof[*]}" OBJCXXFLAGS="${gof[*]} -fobjc-abi-version=2 -fobjc-legacy-dispatch" \
- CPPFLAGS="-I../libffi.${arch}/include" \
- LDFLAGS="-L.." \
- --disable-console
+ configure "sim-${arch}" iphonesimulator "${arch}" "-mios-simulator-version-min=4.0" \
+ true "" "" "-fobjc-abi-version=2 -fobjc-legacy-dispatch" \
+ --disable-console
done
for arch in armv6 armv7 armv7s arm64; do
- cpf="-I../libffi.${arch}/include"
- ldf="-L.."
+ cpf=""
+ ldf=""
flg=()
if [[ ${arch} != armv6 ]]; then
#cpf+=" -mthumb"
fi
- build "ios-${arch}" iphoneos "-arch ${arch} -miphoneos-version-min=${min}" --host=arm-apple-darwin10 \
- CFLAGS="${gof[*]}" CXXFLAGS="${gof[*]}" OBJCXXFLAGS="${gof[*]}" \
- CPPFLAGS="${cpf}" LDFLAGS="${ldf}" LFLAGS="--ecs --meta-ecs" "${flg[@]}"
+ configure "ios-${arch}" iphoneos "${arch}" "-miphoneos-version-min=${min}" \
+ true "${cpf[*]}" "${ldf[*]}" "" \
+ --host=arm-apple-darwin10 LFLAGS="--ecs --meta-ecs" "${flg[@]}"
done
--- /dev/null
+#!/usr/bin/env bash
+
+# Cycript - Optimizing JavaScript Compiler/Runtime
+# Copyright (C) 2009-2015 Jay Freeman (saurik)
+
+# GNU Affero General Public License, Version 3 {{{
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# }}}
+
+set -e
+
+lib=$1
+shift
+extra=("$@")
+
+archs=()
+function arch() {
+ local arch=$1
+ local host=$2
+ local sdk=$3
+ local os=$4
+ local min=$5
+ shift 5
+
+ rm -rf "lib${lib}.${arch}"
+ if ! isysroot=$(xcodebuild -sdk "${sdk}" -version Path); then
+ return
+ fi
+
+ archs+=("${arch}")
+ mkdir "lib${lib}.${arch}"
+
+ flags=("${extra[@]}")
+ flags+=(-isysroot "${isysroot}")
+ flags+=(-m${os}-version-min="${min}")
+ flags+=(-O3 -g3)
+
+ if [[ ${arch} == armv* && ${arch} != armv6 ]]; then
+ flags+=(-mthumb)
+ fi
+
+ cd "lib${lib}.${arch}"
+ CC="clang -arch ${arch}" CXX="clang++ -arch ${arch}" CFLAGS="${flags[*]}" CPPFLAGS="${flags[*]} $*" ../lib"${lib}"/configure --host="${host}" --enable-static --disable-shared
+ make -j5
+ cd ..
+}
+
+arch armv6 arm-apple-darwin10 iphoneos iphoneos 2.0 -mllvm -arm-reserve-r9
+arch armv7 arm-apple-darwin10 iphoneos iphoneos 2.0
+arch armv7s arm-apple-darwin10 iphoneos iphoneos 2.0
+arch arm64 aarch64-apple-darwin11 iphoneos iphoneos 2.0
+
+arch i386 i386-apple-darwin10 iphonesimulator ios-simulator 4.0
+arch x86_64 x86_64-apple-darwin11 iphonesimulator ios-simulator 4.0
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# }}}
-set -e
-
-archs=()
-function arch() {
- local arch=$1
- local host=$2
- local sdk=$3
- local os=$4
- local min=$5
- shift 5
-
- rm -rf "libffi.${arch}"
- if ! isysroot=$(xcodebuild -sdk "${sdk}" -version Path); then
- return
- fi
-
- archs+=("${arch}")
- mkdir "libffi.${arch}"
-
- flags=()
- flags+=(-isysroot "${isysroot}")
- flags+=(-m${os}-version-min="${min}")
- flags+=(-DPAGE_MAX_SIZE=16384 -DPAGE_MAX_SHIFT=14)
- flags+=(-fno-stack-protector)
- flags+=(-O3 -g3)
-
- if [[ ${arch} == arm* && ${arch} != arm64 ]]; then
- flags+=(-mthumb)
- fi
-
- cd "libffi.${arch}"
- CC="clang -arch ${arch}" CXX="clang++ -arch ${arch}" CFLAGS="${flags[*]}" CPPFLAGS="${flags[*]} $*" ../libffi/configure --host="${host}"
- make
- cd ..
-}
-
-arch armv6 arm-apple-darwin10 iphoneos iphoneos 2.0 -mllvm -arm-reserve-r9
-arch armv7 arm-apple-darwin10 iphoneos iphoneos 2.0
-arch armv7s arm-apple-darwin10 iphoneos iphoneos 2.0
-arch arm64 aarch64-apple-darwin11 iphoneos iphoneos 2.0
-
-arch i386 i386-apple-darwin10 iphonesimulator ios-simulator 4.0
-arch x86_64 x86_64-apple-darwin11 iphonesimulator ios-simulator 4.0
-
-libffi=()
-for arch in "${archs[@]}"; do
- a=libffi."${arch}"/.libs/libffi.a
- # sectionForAddress(...) address not in any section file '...' for architecture i386
- ar m "${a}" src/prep_cif.o
- libffi+=("${a}")
-done
-
-lipo -create -output libffi.a "${libffi[@]}"
+exec ./apple-lib.sh ffi -DPAGE_MAX_SIZE=16384 -DPAGE_MAX_SHIFT=14 -fno-stack-protector
--- /dev/null
+#!/usr/bin/env bash
+
+# Cycript - Optimizing JavaScript Compiler/Runtime
+# Copyright (C) 2009-2015 Jay Freeman (saurik)
+
+# GNU Affero General Public License, Version 3 {{{
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# }}}
+
+exec ./apple-lib.sh uv
clean :=
+library := libffi libuv
+
# make stubbornly refuses to believe that these @'s are bugs
# http://osdir.com/ml/help-make-gnu/2012-04/msg00008.html
+define build_lar
+Cycript.lib/$(1).a: $(1).$(2)/.libs/$(1).a
+endef
+
define build_any
.PHONY: build-$(1)-$(2)
build-$(1)-$(2):
clean-$(1)-$(2):
$$(MAKE) -C build.$(1)-$(2) clean
clean += clean-$(1)-$(2)
+ifneq ($(1),sim)
+$(foreach lib,$(library),
+$(call build_lar,$(lib),$(2))
+)
+endif
endef
define build_lib
clean: $(clean)
rm -rf cycript Cycript.lib libcycript*.o
+$(patsubst %,Cycript.lib/%.a,$(library)):
+ @mkdir -p $(dir $@)
+ $(lipo) -create -output $@ $^
+
Cycript.lib/libcycript.dylib: build.osx-i386/.libs/libcycript.dylib build.osx-x86_64/.libs/libcycript.dylib build.ios-armv6/.libs/libcycript.dylib build.ios-arm64/.libs/libcycript.dylib
@mkdir -p $(dir $@)
$(lipo) -create -output $@ $^
$(lipo) -create -output $@ $^
codesign -s $(codesign) $@
-libcycript-%.o: build.%/.libs/libcycript.a xcode.map
+libcycript-%.o: build.%/.libs/libcycript.a $(patsubst %,Cycript.lib/%.a,$(library)) xcode.map
@mkdir -p $(dir $@)
- ld -r -arch $$($(lipo) -detailed_info $< | sed -e '/^Non-fat file: / ! d; s/.*: //') -o $@ -all_load -exported_symbols_list xcode.map -x $< libffi.a
+ ld -r -arch $$($(lipo) -detailed_info $< | sed -e '/^Non-fat file: / ! d; s/.*: //') -o $@ -all_load -exported_symbols_list xcode.map -x $(filter %.a,$^)
libcycript-ios.o: libcycript-ios-armv6.o libcycript-ios-armv7.o libcycript-ios-armv7s.o libcycript-ios-arm64.o libcycript-sim-i386.o libcycript-sim-x86_64.o
$(lipo) -create -output $@ $^
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the <uv.h> header file. */
+#undef HAVE_UV_H
+
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
LTLIBFFI
LIBFFI_LIBS
LIBFFI_CFLAGS
+LTLIBUV
CY_EXECUTE_FALSE
CY_EXECUTE_TRUE
CY_ATTACH_FALSE
case $CY_EXECUTE in #(
1) :
+
+ cy_save=$LIBS
+ LIBS=
+ for ac_header in uv.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "uv.h" "ac_cv_header_uv_h" "$ac_includes_default"
+if test "x$ac_cv_header_uv_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_UV_H 1
+_ACEOF
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uv_loop_init" >&5
+$as_echo_n "checking for library containing uv_loop_init... " >&6; }
+if ${ac_cv_search_uv_loop_init+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uv_loop_init ();
+int
+main ()
+{
+return uv_loop_init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' uv; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_search_uv_loop_init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_uv_loop_init+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_uv_loop_init+:} false; then :
+
+else
+ ac_cv_search_uv_loop_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uv_loop_init" >&5
+$as_echo "$ac_cv_search_uv_loop_init" >&6; }
+ac_res=$ac_cv_search_uv_loop_init
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+fi
+
+done
+
+ LTLIBUV=$LIBS
+ LIBS=$cy_save
+
+
+
for ac_header in ffi.h ffi/ffi.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
AM_CONDITIONAL([CY_EXECUTE], [test "x$CY_EXECUTE" = x1])
AS_CASE([$CY_EXECUTE], [1], [
+ CY_LT_LIB([LTLIBUV], [AC_CHECK_HEADERS([uv.h], [
+ AC_SEARCH_LIBS([uv_loop_init], [uv])
+ ])])
+
AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [break])
CY_LT_LIB([LTLIBFFI], AS_IF([test "x$ac_cv_header_ffi_h" = xno && test "x$ac_cv_header_ffi_ffi_h" = xno], [
--- /dev/null
+Subproject commit 52ae456b0d666f6f4dbb7f52675f4f131855bd22