Skip to content
This repository

FreeBSD compatibility #29

Merged
1 commit merged into from over 3 years ago

3 participants

Benoit Chesneau Adam Kocoloski Joe Williams
Benoit Chesneau

Some changes to allow bigcouch to build on freebsd 8.1.

Adam Kocoloski
Owner

Hi Benoit, the changeset overall looks good. Ideally I'd like to see the typo commit squashed into the FreeBSD compatibility one, and I agree that we should check whether the scripts will work with a general Bourne-compatible shell rather than requiring bash.

Joe Williams

@benoitc I have switched our bigcouch and erl scripts to use sh instead of bash (fd1496a). My initial testing was positive on linux, please give them a shot in your environment.

Benoit Chesneau

typo commit squashed. Also rebased with fd1496a changes . Tested under fbsd 8.1 and works .

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jan 01, 2011
Benoit Chesneau benoitc freebsd compat 582e1f9
This page is out of date. Refresh to see the latest.
4 apps/couch/rebar.config
@@ -2,5 +2,7 @@
2 2 {port_envs, [
3 3 {"DRV_CFLAGS", "$DRV_CFLAGS -DPIC -O2 -fno-common"},
4 4 {"DRV_LDFLAGS", "$DRV_LDFLAGS -lm -licuuc -licudata -licui18n -lpthread"},
5   - {"linux", "DRV_LDFLAGS", "$DRV_LDFLAGS -lcrypt"}
  5 + {"linux", "DRV_LDFLAGS", "$DRV_LDFLAGS -lcrypt"},
  6 + {"freebsd", "DRV_CFLAGS", "$DRV_CFLAGS -I/usr/local/include"},
  7 + {"freebsd", "DRV_LDFLAGS", "$DRV_LDFLAGS -L/usr/local/lib"}
6 8 ]}.
3  configure
... ... @@ -1,5 +1,4 @@
1   -#!/bin/bash
2   -
  1 +#!/bin/sh
3 2 # Copyright 2010 Cloudant
4 3 #
5 4 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
9 couchjs/c_src/SConscript
@@ -11,6 +11,7 @@
11 11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 12 # License for the specific language governing permissions and limitations under
13 13 # the License.
  14 +import os
14 15
15 16 def require_lib(name):
16 17 if not conf.CheckLib(name):
@@ -18,6 +19,14 @@ def require_lib(name):
18 19 Exit(1)
19 20
20 21 env = Environment(CCFLAGS='-g -O2 -DXP_UNIX')
  22 +
  23 +if os.uname()[0] == 'FreeBSD':
  24 + env['CCFLAGS'] += ' -I/usr/local/include'
  25 + env.Append(LINKFLAGS=['-L/usr/local/lib'])
  26 + env['LIB_DL'] = env['LIB_RT'] = ''
  27 + env['LIB_COMPAT'] = 'compat'
  28 +
  29 +
21 30 if not env.GetOption('clean'):
22 31 conf = Configure(env, config_h='config.h')
23 32

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.