Skip to content

Commit 306f5d7

Browse files
stragermstorsjo
authored andcommitted
build-mingw-w64: Install COPYING files
Install copyright notices into the final package. This makes LLVM MinGW comply with many of the licenses (which require attribution), and also makes it easier for users of LLVM MinGW to audit licenses of software they use.
1 parent 0a23956 commit 306f5d7

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

build-mingw-w64-libraries.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ for lib in winpthreads winstorecompat; do
4242
[ -z "$CLEAN" ] || rm -rf build-$arch
4343
mkdir -p build-$arch
4444
cd build-$arch
45-
../configure --host=$arch-w64-mingw32 --prefix="$PREFIX/$arch-w64-mingw32" --libdir="$PREFIX/$arch-w64-mingw32/lib"
45+
arch_prefix="$PREFIX/$arch-w64-mingw32"
46+
../configure --host=$arch-w64-mingw32 --prefix="$arch_prefix" --libdir="$arch_prefix/lib"
4647
make -j$CORES
4748
make install
4849
cd ..
50+
install -Dm644 COPYING "$arch_prefix/share/mingw32/COPYING.${lib}.txt"
4951
done
5052
cd ..
5153
done

build-mingw-w64-tools.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,15 @@ cd build${CROSS_NAME}
9292
../configure --prefix="$PREFIX" $CONFIGFLAGS
9393
$MAKE -j$CORES
9494
$MAKE install-strip
95+
install -Dm644 ../COPYING "$PREFIX/share/gendef/COPYING"
9596
cd ../../widl
9697
[ -z "$CLEAN" ] || rm -rf build${CROSS_NAME}
9798
mkdir -p build${CROSS_NAME}
9899
cd build${CROSS_NAME}
99100
../configure --prefix="$PREFIX" --target=$ANY_ARCH-w64-mingw32 --with-widl-includedir="$INCLUDEDIR" $CONFIGFLAGS
100101
$MAKE -j$CORES
101102
$MAKE install-strip
103+
install -Dm644 ../../../COPYING "$PREFIX/share/widl/COPYING"
102104
cd ..
103105
cd "$PREFIX/bin"
104106
# The build above produced $ANY_ARCH-w64-mingw32-widl, add symlinks to it

build-mingw-w64.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,9 @@ for arch in $ARCHS; do
124124
cd ..
125125
done
126126
cd ..
127+
128+
for arch in $ARCHS; do
129+
for file in COPYING COPYING.MinGW-w64/COPYING.MinGW-w64.txt COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt; do
130+
install -Dm644 "$file" "$PREFIX/$arch-w64-mingw32/share/mingw32/$(basename "$file")"
131+
done
132+
done

0 commit comments

Comments
 (0)