List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH] Fix paths for building in FreeBSD
@ 2012-10-17 16:23 drue
  2012-10-17 16:32 ` Jason
  0 siblings, 1 reply; 12+ messages in thread
From: drue @ 2012-10-17 16:23 UTC (permalink / raw)


---
 Makefile          |    4 ++++
 cgit.conf.freebsd |    6 ++++++
 2 files changed, 10 insertions(+)
 create mode 100644 cgit.conf.freebsd

diff --git a/Makefile b/Makefile
index 1e34129..7a330e7 100644
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,10 @@ ifeq ($(uname_O),Cygwin)
        NEEDS_LIBICONV = YesPlease
 endif

+ifeq ($(uname_S),FreeBSD)
+       include cgit.conf.freebsd
+endif
+
 #
 # Let the user override the above settings.
 #
diff --git a/cgit.conf.freebsd b/cgit.conf.freebsd
new file mode 100644
index 0000000..883d551
--- /dev/null
+++ b/cgit.conf.freebsd
@@ -0,0 +1,6 @@
+# FreeBSD-specific Paths
+LDFLAGS = -L/usr/local/lib
+CFLAGS = -I/usr/local/include
+prefix = /usr/local
+NEEDS_LIBICONV = yes
+GIT_OPTIONS = prefix=/usr/local
--
1.7.10.3





^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 16:23 [PATCH] Fix paths for building in FreeBSD drue
@ 2012-10-17 16:32 ` Jason
  2012-10-17 16:39   ` drue
  0 siblings, 1 reply; 12+ messages in thread
From: Jason @ 2012-10-17 16:32 UTC (permalink / raw)


I've cleaned things up and rewritten it. Let me know if this works for you:
http://git.zx2c4.com/cgit/commit/?h=jd/freebsd&id=5ea22a6b0f7821d9415a27791bacec617c66ec39

Remember to ``make clean'' before testing.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 16:32 ` Jason
@ 2012-10-17 16:39   ` drue
  2012-10-17 16:41     ` Jason
  0 siblings, 1 reply; 12+ messages in thread
From: drue @ 2012-10-17 16:39 UTC (permalink / raw)


On Wed, Oct 17, 2012 at 06:32:32PM +0200, Jason A. Donenfeld wrote:
> I've cleaned things up and rewritten it. Let me know if this works for you:
> http://git.zx2c4.com/cgit/commit/?h=jd/freebsd&id=5ea22a6b0f7821d9415a27791bacec617c66ec39
> 
> Remember to ``make clean'' before testing.

$ gmake clean && V=y gmake
...
cc -o vector.o -c -I/usr/local/include -g -Wall -Igit -DSHA1_HEADER='<openssl/sha.h>' -DCGIT_VERSION='"v0.9.0.3-85-gb20e"' -DCGIT_CONFIG='"/etc/cgitrc"' -DCGIT_SCRIPT_NAME='"cgit.cgi"' -DCGIT_CACHE_ROOT='"/var/cache/cgit"' vector.c
gmake -C git  NO_CURL=1 prefix=/usr libgit.a
gmake[1]: Entering directory `/usr/local/www/cgit-devel/cgit/git'
gmake[1]: Leaving directory `/usr/local/www/cgit-devel/cgit/git'
gmake -C git  NO_CURL=1 prefix=/usr xdiff/lib.a
gmake[1]: Entering directory `/usr/local/www/cgit-devel/cgit/git'
gmake[1]: Leaving directory `/usr/local/www/cgit-devel/cgit/git'
cc -I/usr/local/include -g -Wall -Igit -DSHA1_HEADER='<openssl/sha.h>' -DCGIT_VERSION='"v0.9.0.3-85-gb20e"' -DCGIT_CONFIG='"/etc/cgitrc"' -DCGIT_SCRIPT_NAME='"cgit.cgi"' -DCGIT_CACHE_ROOT='"/var/cache/cgit"' -L/usr/local/lib -o cgit  cache.o cgit.o cmd.o configfile.o html.o parsing.o scan-tree.o shared.o ui-atom.o ui-blob.o ui-clone.o ui-commit.o ui-diff.o ui-log.o ui-patch.o ui-plain.o ui-refs.o ui-repolist.o ui-shared.o ui-snapshot.o ui-ssdiff.o ui-stats.o ui-summary.o ui-tag.o ui-tree.o vector.o git/libgit.a git/xdiff/lib.a -lz -lpthread -lcrypto
git/libgit.a(utf8.o): In function `reencode_string':
/usr/local/www/cgit-devel/cgit/git/utf8.c:436: undefined reference to `libiconv_open'
/usr/local/www/cgit-devel/cgit/git/utf8.c:447: undefined reference to `libiconv'
/usr/local/www/cgit-devel/cgit/git/utf8.c:472: undefined reference to `libiconv_close'
/usr/local/www/cgit-devel/cgit/git/utf8.c:453: undefined reference to `libiconv_close'
gmake: *** [cgit] Error 1

It seems NEEDS_LIBICONV still needs to be defined.

drue




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 16:39   ` drue
@ 2012-10-17 16:41     ` Jason
  2012-10-17 16:45       ` drue
  0 siblings, 1 reply; 12+ messages in thread
From: Jason @ 2012-10-17 16:41 UTC (permalink / raw)


Missed that one, sorry:

http://git.zx2c4.com/cgit/commit/?h=jd/freebsd&id=2853692a9ee7d0b451096f06e8f752d6551f5245




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 16:41     ` Jason
@ 2012-10-17 16:45       ` drue
  2012-10-17 16:46         ` Jason
  0 siblings, 1 reply; 12+ messages in thread
From: drue @ 2012-10-17 16:45 UTC (permalink / raw)


On Wed, Oct 17, 2012 at 06:41:47PM +0200, Jason A. Donenfeld wrote:
> Missed that one, sorry:
> 
> http://git.zx2c4.com/cgit/commit/?h=jd/freebsd&id=2853692a9ee7d0b451096f06e8f752d6551f5245

I tested a clean checkout and it works as expected.

Thanks! 
drue




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 16:45       ` drue
@ 2012-10-17 16:46         ` Jason
  2012-10-17 19:10           ` 
  0 siblings, 1 reply; 12+ messages in thread
From: Jason @ 2012-10-17 16:46 UTC (permalink / raw)


Cool. Will merge.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 16:46         ` Jason
@ 2012-10-17 19:10           ` 
  2012-10-17 19:11             ` Jason
  0 siblings, 1 reply; 12+ messages in thread
From:  @ 2012-10-17 19:10 UTC (permalink / raw)


Just as a note, OpenBSD will need the same settings in order to build
correctly. Can you please add a condition for OpenBSD?

On Wed, Oct 17, 2012 at 6:46 PM, Jason A. Donenfeld <Jason at zx2c4.com> wrote:
> Cool. Will merge.
>
> _______________________________________________
> cgit mailing list
> cgit at hjemli.net
> http://hjemli.net/mailman/listinfo/cgit




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 19:10           ` 
@ 2012-10-17 19:11             ` Jason
  2012-10-17 19:44               ` 
  0 siblings, 1 reply; 12+ messages in thread
From: Jason @ 2012-10-17 19:11 UTC (permalink / raw)


On Wed, Oct 17, 2012 at 9:10 PM, D?en <yvldwt at gmail.com> wrote:
> Just as a note, OpenBSD will need the same settings in order to build
> correctly. Can you please add a condition for OpenBSD?

I don't know BSD uname semantics. It's probably best if you send me a
short patch.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 19:11             ` Jason
@ 2012-10-17 19:44               ` 
  2012-10-17 19:54                 ` Jason
  0 siblings, 1 reply; 12+ messages in thread
From:  @ 2012-10-17 19:44 UTC (permalink / raw)


Is there a way to have a condition like "FreeBSD || OpenBSD" in GNU make?
Normally I'd just do

.if $(uname_S) == FreeBSD || $(uname_S) == OpenBSD
	[...]
.endif

but there does not seem to be a way to implement such a complex condition
with GNU make. I'd quite like to create a patch if you'd be able to help
me out, though. Maybe we should consider to switch to BSD-style Makefiles?

On Wed, Oct 17, 2012 at 9:11 PM, Jason A. Donenfeld <Jason at zx2c4.com> wrote:
> On Wed, Oct 17, 2012 at 9:10 PM, D?en <yvldwt at gmail.com> wrote:
>> Just as a note, OpenBSD will need the same settings in order to build
>> correctly. Can you please add a condition for OpenBSD?
>
> I don't know BSD uname semantics. It's probably best if you send me a
> short patch.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 19:44               ` 
@ 2012-10-17 19:54                 ` Jason
  2012-10-17 19:56                   ` Jason
  0 siblings, 1 reply; 12+ messages in thread
From: Jason @ 2012-10-17 19:54 UTC (permalink / raw)


On Wed, Oct 17, 2012 at 9:44 PM, D?en <yvldwt at gmail.com> wrote:
> but there does not seem to be a way to implement such a complex condition
> with GNU make.

ifeq ($(uname_S),$(filter $(uname_S),FreeBSD OpenBSD))

ugly, but that works.


> Maybe we should consider to switch to BSD-style Makefiles?

Keep dreaming!




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 19:54                 ` Jason
@ 2012-10-17 19:56                   ` Jason
  2012-10-17 19:59                     ` 
  0 siblings, 1 reply; 12+ messages in thread
From: Jason @ 2012-10-17 19:56 UTC (permalink / raw)


http://git.zx2c4.com/cgit/commit/?id=a58d8a168d29d62425391663dedd6dd49ddc523b




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Fix paths for building in FreeBSD
  2012-10-17 19:56                   ` Jason
@ 2012-10-17 19:59                     ` 
  0 siblings, 0 replies; 12+ messages in thread
From:  @ 2012-10-17 19:59 UTC (permalink / raw)


Thank you! Guess I just learned something new about GNU Makefiles.

On Wed, Oct 17, 2012 at 9:56 PM, Jason A. Donenfeld <Jason at zx2c4.com> wrote:
> http://git.zx2c4.com/cgit/commit/?id=a58d8a168d29d62425391663dedd6dd49ddc523b




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-10-17 19:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-17 16:23 [PATCH] Fix paths for building in FreeBSD drue
2012-10-17 16:32 ` Jason
2012-10-17 16:39   ` drue
2012-10-17 16:41     ` Jason
2012-10-17 16:45       ` drue
2012-10-17 16:46         ` Jason
2012-10-17 19:10           ` 
2012-10-17 19:11             ` Jason
2012-10-17 19:44               ` 
2012-10-17 19:54                 ` Jason
2012-10-17 19:56                   ` Jason
2012-10-17 19:59                     ` 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).