Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now it's mdev compatible #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions Packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Marmalade developer package listing.
# Generted by mdev v0.2.
# The format of this file is similar but not identical to that used by debian's apt.
Package-Format: 2
Package: libcurl
Version: 7.21.3.beta4
Revision: 4
Maintainer: Game Master <[email protected]>
Description: |
libcurl
Type: platform-independant
Built-With: 5.1.1
Filename: libcurl_7.21.3.beta4-4.mdev
Size: 3537601
MD5Sum: a64d4ee47b25a836de6f84735b1d94c6

Source: libcurl
Version: 7.21.3.beta4
Revision: 4
Type: platform-independant
Filename: libcurl_7.21.3.beta4-4.msrc
Size: 3561145
MD5Sum: 83ae29b122b7ff23724d8adc51ddde56
4 changes: 4 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ Custom c-ares asynchronous resolver replacement has been added to utilize s3eLoo
The included example will get two files from the Internet.

NOTE: needs a Configure-Extension for Marmalade/AirplaySDK!

------
Add this to sources.list:
https://github.com/gamemaster101gr/libcurl/raw/master
2 changes: 2 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build_*
data-ram
13 changes: 5 additions & 8 deletions libcurl.mkf
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
upstream
{
url="http://curl.haxx.se/download/curl-7.21.3.tar.gz"
}

version 7.21.3.beta4

options
{
module_path_append="$AIRPLAY_ROOT/modules/third_party"
module_path_append="$MARMALADE_ROOT/modules/third_party"
strict=0
extension=start_configure
}

packages
{
zlib
}

subprojects
Expand Down
Binary file added libcurl_7.21.3.beta4-4.mdev
Binary file not shown.
Binary file added libcurl_7.21.3.beta4-4.msrc
Binary file not shown.
18 changes: 18 additions & 0 deletions mdev/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Package: libcurl
Version: 7.21.3.beta4
Revision: 4
Maintainer: Game Master <[email protected]>
Description: |
libcurl
Homepage: https://github.com/marmalade/libcurl
Type: platform-independant
Contents:
- configure.py
- curl_config.h
- curlbuild.h
- libcurl.mkf
- README.txt
- setup.h
- upstream
- fake-ares
- curl
1 change: 1 addition & 0 deletions upstream/.upstream_info
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
curl-7.21.3.tar.gz 25e01bd051533f320c05ccbb0c52b246
106 changes: 106 additions & 0 deletions upstream/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Google Android makefile for curl and libcurl
#
# Place the curl source (including this makefile) into external/curl/ in the
# Android source tree. Then build them with 'make curl' or just 'make libcurl'
# from the Android root. Tested with Android 1.5 and 2.1
#
# Note: you must first create a curl_config.h file by running configure in the
# Android environment. The only way I've found to do this is tricky. Perform a
# normal Android build with libcurl in the source tree, providing the target
# "showcommands" to make. The build will eventually fail (because curl_config.h
# doesn't exist yet), but the compiler commands used to build curl will be
# shown. Now, from the external/curl/ directory, run curl's normal configure
# command with flags that match what Android itself uses. This will mean
# putting the compiler directory into the PATH, putting the -I, -isystem and
# -D options into CPPFLAGS, putting the -W, -m, -f, -O and -nostdlib options
# into CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the
# path to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o.
# Remember that the paths must be absolute since you will not be running
# configure from the same directory as the Android make. The normal
# cross-compiler options must also be set. Note that the -c, -o, -MD and
# similar flags must not be set.
#
# To see all the LIBS options, you'll need to do the "showcommands" trick on an
# executable that's already buildable and watch what flags Android uses to link
# it (dhcpcd is a good choice to watch). You'll also want to add -L options to
# LIBS that point to the out/.../obj/lib/ and out/.../obj/system/lib/
# directories so that additional libraries can be found and used by curl.
#
# The end result will be a configure command that looks something like this
# (the environment variable A is set to the Android root path which makes the
# command shorter):
#
# A=`realpath ../..` && \
# PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
# ./configure --host=arm-linux CC=arm-eabi-gcc \
# CPPFLAGS="-I $A/system/core/include ..." \
# CFLAGS="-nostdlib -fno-exceptions -Wno-multichar ..." \
# LIBS="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
# /interwork/libgcc.a ..."
#
# Finally, copy the file COPYING to NOTICE so that the curl license gets put
# into the right place (but see the note about this below).
#
# Dan Fandrich
# August 2010

LOCAL_PATH:= $(call my-dir)

common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wno-system-headers -DHAVE_CONFIG_H

#########################
# Build the libcurl library

include $(CLEAR_VARS)
include $(LOCAL_PATH)/lib/Makefile.inc
CURL_HEADERS := \
curlbuild.h \
curl.h \
curlrules.h \
curlver.h \
easy.h \
mprintf.h \
multi.h \
stdcheaders.h \
typecheck-gcc.h \
types.h

LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
LOCAL_CFLAGS += $(common_CFLAGS)

LOCAL_COPY_HEADERS_TO := libcurl/curl
LOCAL_COPY_HEADERS := $(addprefix include/curl/,$(CURL_HEADERS))

LOCAL_MODULE:= libcurl

# Copy the licence to a place where Android will find it.
# Actually, this doesn't quite work because the build system searches
# for NOTICE files before it gets to this point, so it will only be seen
# on subsequent builds.
ALL_PREBUILT += $(LOCAL_PATH)/NOTICE
$(LOCAL_PATH)/NOTICE: $(LOCAL_PATH)/COPYING | $(ACP)
$(copy-file-to-target)

include $(BUILD_STATIC_LIBRARY)


#########################
# Build the curl binary

include $(CLEAR_VARS)
include $(LOCAL_PATH)/src/Makefile.inc
LOCAL_SRC_FILES := $(addprefix src/,$(CURL_CFILES))

LOCAL_MODULE := curl
LOCAL_STATIC_LIBRARIES := libcurl
LOCAL_SYSTEM_SHARED_LIBRARIES := libc

LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib

# This may also need to include $(CURLX_ONES) in order to correctly link
# if libcurl is changed to be built as a dynamic library
LOCAL_CFLAGS += $(common_CFLAGS)

include $(BUILD_EXECUTABLE)

Loading