diff options
| author | Michael Forney <mforney@mforney.org> | 2016-12-11 16:04:20 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-12-13 23:10:30 -0800 |
| commit | 293f5a93b77d92fd65db7f3d0df654f102e46cfb (patch) | |
| tree | 6ecd1170e3dd793862dd852814dc1b4cd5e44260 /pkg/swc | |
| parent | 9a506a6834df01a26795cea222b410f206efa9fa (diff) | |
Move to flat package hierarchy
Note to self: never try to move submodules again
To migrate your existing submodules (more or less):
set -x
set -e
mkdir .git/modules/pkg
for old in */*/src ; do
new="pkg/${old#*/}"
if ! [ -f "$old/.git" ] || [ "${old%%/*}" = pkg ] ; then
continue
fi
git -C ".git/modules/$old" config core.worktree "../../../../../$new"
rmdir "$new"
mv "$old" "$new"
sed -e "s,$old,$new," "$new/.git" > "$new/.git.tmp"
mv "$new/.git.tmp" "$new/.git"
mkdir ".git/modules/${new%/src}"
mv ".git/modules/$old" ".git/modules/$new"
rm "${old%/src}"/*.ninja
mv "${old%/src}"/*.tar.{gz,xz,bz2} "${new%/src}/"
rmdir "${old%/src}" || true
done
sed -e 's,^\[submodule "[^/]*/,[submodule "pkg/,' .git/config > .git/config.tmp
mv .git/config.tmp .git/config
Diffstat (limited to 'pkg/swc')
| -rw-r--r-- | pkg/swc/.gitignore | 1 | ||||
| -rw-r--r-- | pkg/swc/gen.rc | 96 | ||||
| -rw-r--r-- | pkg/swc/rev | 1 | ||||
| m--------- | pkg/swc/src | 0 |
4 files changed, 98 insertions, 0 deletions
diff --git a/pkg/swc/.gitignore b/pkg/swc/.gitignore new file mode 100644 index 00000000..012dc66e --- /dev/null +++ b/pkg/swc/.gitignore @@ -0,0 +1 @@ +/tools.ninja diff --git a/pkg/swc/gen.rc b/pkg/swc/gen.rc new file mode 100644 index 00000000..8ec3f494 --- /dev/null +++ b/pkg/swc/gen.rc @@ -0,0 +1,96 @@ +cflags\ + -D _GNU_SOURCE\ + -D 'screen_new=swc__screen_new' \ + -D 'remove_resource=swc__remove_resource' \ + -isystem pkg/fontconfig/src\ + -isystem pkg/libdrm/src/include/drm\ + -isystem pkg/libdrm/src\ + -isystem pkg/libevdev/src\ + -isystem pkg/libxkbcommon/src\ + -isystem '$builddir'/pkg/pixman/include\ + -isystem '$builddir'/pkg/wayland-protocols/include\ + -isystem '$builddir'/pkg/wayland/include\ + -isystem '$builddir'/pkg/wld/include\ + -I '$outdir' \ + -I '$outdir'/include\ + -I '$srcdir' + +cc launch/protocol.c + +waylandproto protocol/swc.xml\ + include/swc-^(client server)^-protocol.h swc-protocol.c + +build '$outdir'/include/swc.h copy '$srcdir'/libswc/swc.h +phony headers '$outdir'/include/^(swc.h swc-^(client server)^-protocol.h) + +build '$outdir'/wayland-drm-server-protocol.h copy '$builddir'/pkg/wld/protocol/wayland-drm-server-protocol.h + +{ + include 'toolchain/$host_toolchain.ninja' + exe convert_font cursor/convert_font.c +} >tools.ninja +subninja '$dir'/tools.ninja + +rule convert_font '$outdir/convert_font $in $out.tmp 2>/dev/null && mv $out.tmp $out' +build '$outdir'/cursor/cursor_data.h convert_font '$srcdir'/cursor/cursor.pcf '|' '$outdir'/convert_font + +phony deps\ + '$outdir'/^(\ + wayland-drm-server-protocol.h\ + include/swc-server-protocol.h\ + cursor/cursor_data.h\ + )\ + '$builddir'/pkg/^(fontconfig libdrm libevdev libxkbcommon)^/fetch.stamp\ + pkg/^(pixman wayland wayland-protocols wld)^/headers + +lib libswc.a -d '$dir'/deps\ + libswc/^(\ + bindings.c\ + compositor.c\ + cursor_plane.c\ + data.c\ + data_device.c\ + data_device_manager.c\ + drm.c\ + evdev_device.c\ + input.c\ + keyboard.c\ + launch.c\ + mode.c\ + output.c\ + panel.c\ + panel_manager.c\ + pointer.c\ + primary_plane.c\ + region.c\ + screen.c\ + seat.c\ + shell.c\ + shell_surface.c\ + shm.c\ + subcompositor.c\ + subsurface.c\ + surface.c\ + swc.c\ + util.c\ + view.c\ + wayland_buffer.c\ + window.c\ + xdg_popup.c\ + xdg_shell.c\ + xdg_surface.c\ + )\ + launch/protocol.c.o\ + swc-protocol.c.o\ + '$builddir'/^(\ + pkg/libevdev/libevdev.a\ + pkg/libxkbcommon/libxkbcommon.a\ + pkg/wayland-protocols/xdg-shell-unstable-v5-protocol.c.o\ + pkg/wayland/libwayland-server.a.d\ + pkg/wld/libwld.a.d\ + ) + +exe swc-launch launch/^(launch.c protocol.c.o) '$builddir'/pkg/libdrm/libdrm.a +file bin/swc-launch '$outdir'/swc-launch 4755 + +fetch git diff --git a/pkg/swc/rev b/pkg/swc/rev new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/pkg/swc/rev @@ -0,0 +1 @@ +1 diff --git a/pkg/swc/src b/pkg/swc/src new file mode 160000 +Subproject ee0825dd7b49a5ac65d5e94bdad159ca77481bc |
