Skip to content

Commit

Permalink
build: Convert to external libedit build package
Browse files Browse the repository at this point in the history
* Drop lib/edit and matching bsd header
* Convert Debugger to libedit build package
* Should solve problems with libedit consumers
  not defining _BSD_SOURCE
* Progress on #10267
  • Loading branch information
kallisti5 committed Jul 4, 2015
1 parent d162017 commit 7e24b65
Show file tree
Hide file tree
Showing 50 changed files with 44 additions and 17,453 deletions.
17 changes: 17 additions & 0 deletions build/jam/BuildFeatures
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,23 @@ if [ IsPackageAvailable zlib_devel ] {
}


# libedit
if [ IsPackageAvailable libedit_devel ] {
ExtractBuildFeatureArchives libedit :
file: base libedit
runtime: lib
file: devel libedit_devel
depends: base
library: $(developLibDir)/libedit.so
headers: $(developHeadersDir)
;

EnableBuildFeatures libedit ;
} else {
Echo "libedit support not available on $(TARGET_PACKAGING_ARCH)" ;
}


# libsolv
if [ IsPackageAvailable libsolv_devel ] {
ExtractBuildFeatureArchives libsolv :
Expand Down
4 changes: 4 additions & 0 deletions build/jam/DefaultBuildProfiles
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ rule DefineDefaultBuildProfiles
grep
haikuporter
less
libedit
libedit_devel
m4
make
ncurses
Expand All @@ -193,6 +195,8 @@ rule DefineDefaultBuildProfiles
gcc
icu
libsolv
libedit
libedit_devel
ncurses
ncurses_devel
zlib
Expand Down
236 changes: 0 additions & 236 deletions headers/compatibility/bsd/histedit.h

This file was deleted.

26 changes: 17 additions & 9 deletions src/apps/debugger/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ UseHeaders [ FDirName $(TARGET_COMMON_DEBUG_OBJECT_DIR_$(TARGET_PACKAGING_ARCH))
UsePrivateHeaders app debug interface kernel package shared libroot ;
UsePrivateSystemHeaders ;

UseBuildFeatureHeaders libedit ;

LINKFLAGS += -Wl,--exclude-libs,ALL ;

SubDirC++Flags [ FDefines _BSD_SOURCE=1 ] ;
Expand Down Expand Up @@ -71,12 +73,7 @@ SourceHdrs
: [ FDirName $(SUBDIR) dwarf ]
;

# since syscall_numbers.h is generated on the fly, we need to explicitly
# let Jam know about the dependency.
Includes [ FGristFiles TeamDebugger.cpp ]
: <syscalls!$(TARGET_PACKAGING_ARCH)>syscall_numbers.h ;

Application Debugger :
local sources =
Debugger.cpp

# arch
Expand Down Expand Up @@ -384,25 +381,36 @@ Application Debugger :
FloatValue.cpp
IntegerValue.cpp
StringValue.cpp
;

# since syscall_numbers.h is generated on the fly, we need to explicitly
# let Jam know about the dependency.
Includes [ FGristFiles $(sources) ] :
<syscalls!$(TARGET_PACKAGING_ARCH)>syscall_numbers.h
[ BuildFeatureAttribute ncurses : headers ]
[ BuildFeatureAttribute libedit : headers ]
;

Application Debugger :
$(sources)
:
<nogrist>Debugger_demangler.o
<nogrist>Debugger_disasm_x86.o
<nogrist>Debugger_disasm_x86_64.o
<nogrist>Debugger_dwarf.o
<nogrist>DebugAnalyzer_gui_table.o

[ BuildFeatureAttribute ncurses : library ]

libudis86.a
<bin>debug_utils.a
libcolumnlistview.a
libshared.a
libedit.a

[ TargetLibstdc++ ]
be package tracker libbsd.so libdebug.so

[ BuildFeatureAttribute ncurses : library ]
[ BuildFeatureAttribute libedit : library ]

: Debugger.rdef
;

Expand Down
7 changes: 6 additions & 1 deletion src/bin/network/ftp/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if ! $(TARGET_PLATFORM_HAIKU_COMPATIBLE) {
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
SubDirCcFlags [ FDefines _BSD_SOURCE=1 ] ;

UseBuildFeatureHeaders libedit ;

BinCommand ftp :
cmds.c
cmdtab.c
Expand All @@ -22,7 +24,10 @@ BinCommand ftp :
progressbar.c
ruserpass.c
util.c
: libedit.a [ BuildFeatureAttribute ncurses : library ] libutil.a libbsd.so
:
[ BuildFeatureAttribute libedit : library ]
[ BuildFeatureAttribute ncurses : library ]
libutil.a libbsd.so
$(TARGET_NETWORK_LIBS)
;

Expand Down
1 change: 0 additions & 1 deletion src/libs/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ SubInclude HAIKU_TOP src libs alm ;
SubInclude HAIKU_TOP src libs bsd ;
SubInclude HAIKU_TOP src libs compat ;
SubInclude HAIKU_TOP src libs crypt ;
SubInclude HAIKU_TOP src libs edit ;
SubInclude HAIKU_TOP src libs fluidsynth ;
SubInclude HAIKU_TOP src libs glut ;
SubInclude HAIKU_TOP src libs gnu ;
Expand Down

0 comments on commit 7e24b65

Please sign in to comment.